LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Touble booting into external HDD (https://www.linuxquestions.org/questions/linux-newbie-8/touble-booting-into-external-hdd-853068/)

ichase 12-29-2010 12:07 PM

Touble booting into external HDD
 
Greetings all. I do hope everyone had a great holiday and is looking forward to 2011.

As a new linux user, :newbie: I have printed out many manuals and guidance from sites such as this one and added them to my 2 inch binder (which is already close to full) :study: and this is a problem I have not run across yet.

I am currently multibooting on a Dell Inspiron Lappy with the following OSs: Win XP Pro, Ultimate Edition 2.8, and Mandriva 2010.2. Once I figured out how to "Temporarily" fix the Grub2 issue in getting Mandriva to load when selected from my grub menu after kernel panic I was good to go. That is another issue I am trying to figure out how to fix permanantly, but that will require more reading on my part.

The problem I am having is this. I formatted and partitioned a 250 GB external HDD. Using GParted on my Parted Magic Live CD (Awesome...If you do not have this I HIGHLY recommend getting you a copy):cool:
here is the result of the partitions:
http://www.imagebam.com/image/29d599112950357

My plan was/is to install multiple distros on this external so while plugged in I could select anyone of them from my grub menu. My first install was Pinguy OS 10.10. The install went fine. I installed to sdb5 and had it install the bootloader to that same partition as well so not to screw up my Grub on the MBR. Made that mistake twice and NOTHING would boot. Thank goodness for Clonezilla :D
I rebooted and went into my Ultimate Edition OS (which is hosting Grub) and went into terminal and typed the following:
Code:

sudo grub-mkconfig -o /boot/grub/grub.cfg
This command was supposed to scan my internal and external drives for OS's and update the grub.cfg file containing entries for all my OS's. Which it did. When I rebooted the computer, the Pinguy OS now showed on my grub menu attached to hd1/sdb5. When I selected it I got the following error:
Code:

error:  no such device: 40e4c837-a4ee-4ccf-a898-88d97df9ef83.
error:  hd1,msdos5 cannot get C/H/S values. 
error:  you need to load the kernel first.

Press any key to continue...

Pressing any key brings me back to my grub menu. By the way, what are C/H/S values?? (Have not googled that one yet :) )


I then formatted the partition and re-installed Pinguy OS but this time had the bootloader load to SDB and not one particular partition. The resulting error was the same. I did go back in and update my grub.cfg file prior to doing this so that it would recognize the changes that I had made.

I know this works, as I have read about people running multiple OSs on externals but have not run into anyone else having this same issue.

Just in case anyone wanted it, here is the entry for the Pinguy OS in my grub.cfg file
Code:

menuentry "Pinguy OS, Linux 2.6.35-23-generic (on /dev/sdb5)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 40e4c837-a4ee-4ccf-a898-88d97df9ef83
    linux /boot/vmlinuz-2.6.35-23-generic root=UUID=40e4c837-a4ee-4ccf-a898-88d97df9ef83 ro quiet splash
    initrd /boot/initrd.img-2.6.35-23-generic
}
menuentry "Pinguy OS, Linux 2.6.35-23-generic (recovery mode) (on /dev/sdb5)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 40e4c837-a4ee-4ccf-a898-88d97df9ef83
    linux /boot/vmlinuz-2.6.35-23-generic root=UUID=40e4c837-a4ee-4ccf-a898-88d97df9ef83 ro single
    initrd /boot/initrd.img-2.6.35-23-generic
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

Thanks ahead of time for all your help and guidance. :hattip:
All the best,

Ian

Snark1994 12-30-2010 10:14 AM

Try getting to the grub prompt and typing
Code:

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 40e4c837-a4ee-4ccf-a898-88d97df9ef83
linux /boot/vmlinuz-2.6.35-23-generic root=UUID=40e4c837-a4ee-4ccf-a898-88d97df9ef83 ro quiet splash
initrd /boot/initrd.img-2.6.35-23-generic

which is what you had before, and
Code:

insmod normal
normal

which is apparently magic to get certain Dells to boot after getting the C/H/S error :)

ichase 01-03-2011 05:54 AM

Thank you for taking the time to reply Snark. You mention typing the above at the grub prompt? At what point do I get to the grub prompt? I guess the option may be at the grub menu. Either way I will have to take a look.

Why would I have to type
Code:

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 40e4c837-a4ee-4ccf-a898-88d97df9ef83
linux /boot/vmlinuz-2.6.35-23-generic root=UUID=40e4c837-a4ee-4ccf-a898-88d97df9ef83 ro quiet splash
initrd /boot/initrd.img-2.6.35-23-generic

Before typing:
Code:

insmod normal
normal

Thanks again for your help. Hope 2011 is starting off great!!

All the best,

Ian

Snark1994 01-03-2011 12:14 PM

EDIT: I did a bit more thinking and research, and I'm not completely sure that what I've told you to do will actually sort your problem. Some people seemed to be suggesting that "insmod normal", "normal" would get the menu up if it didn't come up normally, while others who quoted your bug said that they typed "insmod normal", "normal" into the prompt to boot nicely. I also looked back at your post and saw that there was an error before the C/H/S one which I must have missed last time. If what I wrote below works, then great, and if not, I would suggest reinstalling grub as it sounds like it's having difficulty finding one of your drives... As always, post back with results ;)
END OF EDIT

Oh, if you can get to the grub menu then you should just be able to press a key (I'm almost certain it's E - but it should tell you in the text below the menu) to edit the list of things it executes before booting. So hopefully
Code:

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 40e4c837-a4ee-4ccf-a898-88d97df9ef83
linux /boot/vmlinuz-2.6.35-23-generic root=UUID=40e4c837-a4ee-4ccf-a898-88d97df9ef83 ro quiet splash
initrd /boot/initrd.img-2.6.35-23-generic

is what you already have in there, as that is what you posted from your grub.cfg file. I suggested that you should add
Code:

insmod normal
normal

to the end of that, which according to the article to which I linked should hopefully fix the error you're getting. Then, finally, press the key combination which boots it (again, I'm not absolutely certain but I think it's Ctrl+X - and again, it tells you at the bottom of the screen).

ichase 01-03-2011 01:39 PM

Thanks again Snark,
How about this. Edit the grub.cfg file and add
Code:

insmod normal
normal

to the end of the Pinguy OS entry?
Instead of adding it at the grub prompt. You are right, E is what you type to "E"dit.

I edited my grub.cfg file before because my grub menu was so un-orginized. Had multiple kernals to go into, memory tests etc. I removed all of the entries and typed in the actual OS in the menuentry line, saved the file and re-booted. I had a very nice organized grub menu after that. :)
So in theory adding the insmod normal / normal should work as well. What do you think?

Ian

tommyttt 01-04-2011 02:11 AM

Quote:

Pressing any key brings me back to my grub menu. By the way, what are C/H/S values?? (Have not googled that one yet )
To add to your store of knowledge, C/H/S stands for Cylinders/Heads/Sectors, the perceived geometry reported by the BIOS. It may not be the true physical layout of the drive.

Tom

Snark1994 01-04-2011 10:57 AM

Code:

[joshua@joshua-desktop:~]$ head /boot/grub/grub.cfg -n 6          (01-04 16:51)
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

says no. The only issue is that if you run update-grub afterwards, then I think it will overwrite your settings...

On the other hand, I don't know how to do what you want to do without editing /boot/grub/grub.cfg, so you could just change it and remember to change it again if you ever run 'update-grub'. Or I guess you could actually work out how you're meant to customise existing menu entries... Good luck either way :)

ichase 01-05-2011 04:11 PM

Quote:

Originally Posted by Snark1994 (Post 4212834)
Code:

[joshua@joshua-desktop:~]$ head /boot/grub/grub.cfg -n 6          (01-04 16:51)
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

says no. The only issue is that if you run update-grub afterwards, then I think it will overwrite your settings...

On the other hand, I don't know how to do what you want to do without editing /boot/grub/grub.cfg, so you could just change it and remember to change it again if you ever run 'update-grub'. Or I guess you could actually work out how you're meant to customise existing menu entries... Good luck either way :)

Snark,
Taken me awhile to get on and try your suggestion. I added the insmod normal / normal at the end of my Pinguy entry and this time, when I selected Pinguy on my grub menu, I did not get the error but it automatically went back to my grub menu and everything was duplicated.
I went back and re-read my OP, I had a slight typo, this lappy is a Compaq Presario V2000. The Dell Inspiron went out the window and crashed to the concrete below. (that's a story for another day. :) ) Like many computer enthusiast, I have worked with many different computers and they tend to sometimes run together. LOL

Think I am going to look at PlopBoot manager. Claims to be able to boot USB even when BIOS does not support it. More to follow. :)

Tommy,
Thank you for clearing up the C/H/S question. :)

All the best,

Ian

Snark1994 01-06-2011 09:54 AM

Ooh, that looks nice... Never seen that before, do keep us posted on whether it works ;)

Best of luck,

Fred Caro 01-06-2011 10:58 AM

booting from usb
 
I take it that the concreted laptop did not support booting from usb in its bios, bit late now but I take it flashing the bios was not an option. I'm not one for editing important files (doubtless you saved a copy of the old one) but one thing I have found handy for rescuing errant grub files is the supergrubdisk(.org) downloadable at that address. Be interested to find out what happens with 'plop'.

Fred.

ichase 01-10-2011 07:32 AM

Quote:

Originally Posted by Fred Caro (Post 4215412)
I take it that the concreted laptop did not support booting from usb in its bios, bit late now but I take it flashing the bios was not an option. I'm not one for editing important files (doubtless you saved a copy of the old one) but one thing I have found handy for rescuing errant grub files is the supergrubdisk(.org) downloadable at that address. Be interested to find out what happens with 'plop'.

Fred.

The concreted lappy did support booting from USB but this lappy (Compaq V2000) does not. The newest edition of Parted Magic (5.8) has Plop bootmanager in the "Extras" menu. I was able to select USB and as advertised was able to select my Pinguy OS on the external HD and it ran great. The grub menu that came up also allowed me to select my OS's (currently 3 of them) installed on the internal.
Now, all I have to do is figure out how to configure Plop's grub menu, because it really is un-orginized. Often times, grub will interpret an OS by it's "host" OS along with Kernel edition. For example. Pinguy, Ultimate Edition etc are all based on Ubuntu. So your grub selection shows them as Ubuntu OSs. Going in and editing your grub.cfg file is no problem, but not sure where or how to locate the grub file that Plop uses in order to tidy up my grub menu.

Oh by the way, I did save the original copy of the grub.cfg file prior to making changes as well as cloned the hosting OS. ;) I normally in most cases won't edit important files but I'm at the mind set of "If it works great...If it did not, now I know."

Either way, I can confirm that Plop does work as advertised in regards to booting up OS's on external hard drives when the lappy it is attached to is not BIOS USB Boot supported.

All the best,

Ian

skipdashu 01-29-2011 09:41 PM

Assuming we're talking about Grub2 here, then here are some instructions on how to modify the scripts in /etc/grub.d/ to customise the grub2 menu so that it rebuilds as you'd like it each time. I think the sections you might be interested in are 30_os-prober 40_custom. These are 2 of the scripts that update-grub executes to build the menus. I've not personally dug into this much but have renamed some of these to reorder some entries in the grub2 menu.


All times are GMT -5. The time now is 09:29 PM.