Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 07:17
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HowTo install grub2 from within UPup Raring 3.9.9.2
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
go2null

Joined: 23 Oct 2011
Posts: 11

PostPosted: Mon 25 Nov 2013, 04:50    Post subject:  HowTo install grub2 from within UPup Raring 3.9.9.2  

It all started when I screwed up my USB stick with Puppy.

I found an old CD-RW with LuPu and tried to re-install grub2 using PPM, but it didn't work.

(BTW, I want to use grub2 as it allows booting into a LUKS partition, which is where I normally have Lubuntu installed.)

So I downloaded the raring-3.9.9.2-SCSI.iso and burned it to the CD-RW.

After updating PPM, i removed grub and grub4dos just to ensure no incompatibilities, then installed grub2.

My USB stick is partitioned as follows:
Code:
/dev/sdb1 - NTFS - PUBLIC                     # frugal installs go here
/dev/sdb2 - ext4 -  DATA                        # will be changed to LUKS later
/dev/sdb3 - ext4 -  BOOT - boot flag set # only grub2 installed here


Adapting instructions on the Ubuntu forums, I did the following:
Code:
mkdir /mnt/temp
mount --bind / /mnt/temp
mount /dev/sdb3 /mnt/temp/boot
# for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/temp$i;  done  #not needed
chroot /mnt/temp
grub-install /dev/sdb
ls /boot/grub/i386-pc # list modules to verify installation


Get UUIDs to use as more reliable than labels or device mappings
Code:
blkid


Add the entries to /etc/grub.d/40_custom.
Code:
menuentry "Puppy - Ubuntu Raring" {
   insmod ext2
   search --no-floppy --fs-uuid --set=root 3A61E83C3B8BF801 --hint hd0,msdos1
   set PSUBDIR=boot/pupUR
   linux /$PSUBDIR//vmlinuz psubdir=$PSUBDIR
   initrd /$PSUBDIR/initrd.gz
}


At this point, update-grub was failing with error
Code:
/usr/sbin/grub-probe: error: failed to get canonical path of unionfs.


A look at update-grub revealed that it was merely pointing to grub-mkconfig
Code:
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"


Searching grub-mkconfig for grub-probe was pretty straight-forward and led easily to the patch.
Code:
#GRUB_DEVICE="`${grub_probe} --target=device /`"
GRUB_DEVICE='/dev/sdb3'


update-grub then ran and created the /boot/grub/grub.cfg file.
Code:
update-grub


Exit chroot.
Code:
exit


Reboot to test.

------
Other References:
http://www.dedoimedo.com/computers/grub-2.html
https://help.ubuntu.com/community/Grub2

EDIT: /proc etc. not need. Rebuilt USB stick, moving BOOT to last on disk so that I can more easily resize PUBLIC and DATA as needed.
EDIT: Cleaned up sequence to make it simplier.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0506s ][ Queries: 11 (0.0068s) ][ GZIP on ]