Installing to a USB hard drive { booting grub }

Installer Issues via Installer -- Not for global upgrades or upgrading individual packages -- ONLY ISSUES WITH INSTALLATION OF THE OS -- Can't get Sabayon installed, than post here, otherwise use correct forums

Moderator: Moderators

Installing to a USB hard drive { booting grub }

Postby nitehawck » Thu Sep 13, 2007 8:47

Here is the situation, some help would be great.

I installed Sabayon to my USB hard drive with 3 partitions (boot, root, and swap). I have Vista installed on my internal hard drive with a Raid 0 configuration. I installed EasyBSD for dual booting. When I get to the dual boot menu and choose Sabayon i get a Hard Disk error from GRUB.

If I boot directly from the USB drive by changing the boot order in the BIOS, I get a GRUB command prompt. I managed to load the kernel and boot using these kernel and initrd commands. Linux starts booting and then asks me for the root. This is the weird part: I type in /dev/sdc2 and it complains. I type it in again and it works.

Is it possible to automate this so I don't have to type in the GRUB commands every time? Would this solve the dual booting issue as well...


Thanks,
Jeremy
nitehawck
Baby Hen
 
Posts: 1
Joined: Thu Sep 13, 2007 8:37

Re: Installing to a USB hard drive { booting grub }

Postby WarraWarra » Thu Sep 13, 2007 18:04

Not sure as SL does name the hd's as 5y24957-837546582-17367388516-9835127 or something like this and might be confusing the actual hd with a partition on the raid not that it should. In the BSD something you have not sure how this work but you can try to run "grub-install" and it should if you have a /etc/fstab and /etc/mtab use this / read it and then make a new grub boot for you from the partitions list.
All hd's is labeled as /dev/sd* in SL even for /dev/hda = /dev/sda in SL.

Alternatively if you install then write the boot not to MBR but to actual usb hd disk as if thought there is no other disks installed in your pc and possibly try using grub with "chainloader+1" option or something like this to boot other partitions.
This should then hand the booting of to the "usb hd MBR" and boot from there possibly showing grub boot menu again for SL ??

Please check this against correct info from a grub wiki or gentoo grub wiki or similar as I have seen this done but can not remember the details at this moment.

This way you can boot of any pc provided you can select the start up disk to boot from or can edit a boot loader on any pc to do something similar.
Booting to a specific hd you can likely press F12 or F8 to open a boot meny from the motherboard bios and select bootable device then the usb hd will be 1st hd or /dev/sda

Hope this helps.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: Installing to a USB hard drive { booting grub }

Postby mktyap » Tue Sep 25, 2007 13:11

nitehawck wrote:I installed Sabayon to my USB hard drive with 3 partitions (boot, root, and swap). I have Vista installed on my internal hard drive with a Raid 0 configuration. I installed EasyBSD for dual booting. When I get to the dual boot menu and choose Sabayon i get a Hard Disk error from GRUB.
If I boot directly from the USB drive by changing the boot order in the BIOS, I get a GRUB command prompt. I managed to load the kernel and boot using these kernel and initrd commands. Linux starts booting and then asks me for the root. This is the weird part: I type in /dev/sdc2 and it complains. I type it in again and it works.
Is it possible to automate this so I don't have to type in the GRUB commands every time? Would this solve the dual booting issue as well...
Jeremy


I had that too, exactly. As root check the UUID of /dev/sdc2 by >blkid /dev/sdc2 and copy the UUID numbers
After the "root=/dev/sdc2" in your /boot/grub/menu.lst follow with "real_root=UUID=xxxxx-xxxxx-xxxxx" (from above)
You shd now be able to boot thru.
mktyap
Simple Hen
 
Posts: 97
Joined: Thu Feb 15, 2007 1:51
Location: Sg

Re: Installing to a USB hard drive { booting grub }

Postby WarraWarra » Tue Sep 25, 2007 20:04

Just had to fix my grub as well:

HOW:
1. Booted the live cd of 3.4 mini 32bit and then once in as root in terminal I mounted the root partition to gentoo in mnt as well as boot after this.
# su
passwd:
Now I am root.

# mount /dev/sda3 /mnt/gentoo
# mount /dev/sda1 /mnt/gentoo/boot

2. Hd mounted now I could go into chroot and fix it but first had to mount /proc and /dev on this hd for everything to work as planned.

# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev

3. ChRoot:

# chroot /mnt/gentoo /bin/bash
# env-update
>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# export PS1="(chroot) $PS1"

Now I am inside with same effect as if I would have successfully booted into it and can do normal emerge installs + updates provided you got the internet conenction up before chrooting into this.
We need a /etc/mtab to show according to the bios where and how things are for partitions.

# grep -v rootfs /proc/mounts > /etc/mtab

Next I had to run grub-install to fix the stuff-up in /boot or in grub.conf

# grub-install --no-floppy /dev/sda

No errors = yay = :)

Next type "exit + enter" to get out of chroot and then "cd /" to get out of the directory you want to unmount next unmount "umount /dev/sda1" same with sda3 and proc / dev if you can, although this does give errors /proc and /dev is busy who cares I am going to reboot and this should unmount it by default LOL.

# umount /mnt/gentoo/dev
:)
# umount /mnt/gentoo/proc
:)

Reboot and remove cd = all is well again and back into kde on 3.4 mini LOL

Guide for doing this = old school linux install:
http://www.gentoo.org/doc/en/handbook/h ... ull=1#grub

Just use ctrl+f to open firefox search and search for chroot or the grep part or grub-install same as above.

Hope this helps.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: Installing to a USB hard drive { booting grub }

Postby mktyap » Wed Sep 26, 2007 3:00

Nope - Followed exactly to grub-install /dev/sdc but Mini still no boot with /rc errors (see viewtopic.php?f=50&t=10493)
Worse - now my grub menu for the other distros set up on my usb (/dev/sdc1 to 3) is mangled and Ive lost my screen select boot

How do I clean up my grub on the usb root?
mktyap
Simple Hen
 
Posts: 97
Joined: Thu Feb 15, 2007 1:51
Location: Sg

Re: Installing to a USB hard drive { booting grub }

Postby WarraWarra » Wed Sep 26, 2007 3:40

Only thing I can think of is to disconect the other drives install and then use the MBR of the usb. Later conect the other hd's and use maybe windows boot.ini if on xp or similar and edit it to load the usb drive and then goes into grub on the usb hd + boot it.

Edit grub manually with a text editor. Or likely there could be a grub.back or something like this with the old boot info in it. I have once had success with copying the /boot from the live cd of another gentoo distro to the actual hd /boot and then with edit both /etc/fstab and /etc/mtab to show where and what is related to the installed version of that gentoo distro + ran grub-install to fix it. Maybe you can cheat the actual booting with replacing the 124124-4231541324-233423 text with /dev/sdc3. Your /etc/fstab or /etc/mtab might have confusing info in it or is looking for the USB device to be 1st hd not sure. This can happen. Bit then it should not be able to boot past the kernel or lockup before pulling in the files from the root partition or something.

rc errors no idea why or how-to fix this.

Right now I am in xp pro opening "explore2fs" and browsing my ext3 /boot and ext3 root partitions for 3.4 mini.
http://www.chrysocome.net/explore2fs

This could helps you as well as :
http://gujin.sourceforge.net/#WhatIsIt

Code: Select all
Gujin is a PC boot loader which can analyze your filesystems.
It finds the Linux kernel images available, as well as other bootable partitions (for *BSD, MS-DOS, Windows, etc.) and files (*.kgz), and displays a graphical menu for selecting which system to boot.
Because it understands the structure of Linux kernel images, Gujin does not need LILO nor GRUB and can even load very big kernels.


Acronis disk director also has a "OS boot selector" that loads before windows does and can be used as well as alternative to grub , not sure have not used it to boot with.

Not sure if LILO can work but might need to be installed first and then edited or something.

Sry I do not have a proper answer for you.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511


Return to Installer Issues - Calamares **Not for Package Manager Stuff**

Who is online

Users browsing this forum: No registered users and 3 guests