Results 1 to 10 of 27
Hi,
I am new to linux but have managed to get dual boot working with Windows 2000 and Debian Linux. So now I am getting little ambitious and I am ...
- 09-28-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
[SOLVED] Multi-Boot from USB connected External Drive
Hi,
I am new to linux but have managed to get dual boot working with Windows 2000 and Debian Linux. So now I am getting little ambitious and I am trying to have a 3rd. boot partition for Oracle's Enterprise Linux. This is going on my new 76 GB external drive that is connected via a USB port. I was able to successfully install Enterprise Linus on the external drive, but I am not able to boot it.
I am using GRUB as a boot loader. I have modified my /boot/grub/menu.lst file and added the new Linux entries.
I have added the entry
(hd1) /dev/sda
to the device.map file and then run the following command
grub-install /dev/hda.
When I boot the system the entry shows on my GRUB menu but when I select it, I get an error Error 21.
If I toggle to command line from GRUB menu and try
root (hd1.0)
again I get the same Error 21 message.
Once I boot into Debian Linux (which is still working) and go the GRUB shell and submit command like
root (hd1,0) , it tells me
Filesystem type is ext2fs, partition type 0x83.
When I do fdisk -l (small L) as a root, I see /dev/sda device as my second hard drive with its 3 partitions listed below it.
My BIOS does support USB Boot. So I am thinking the BIOS does not know about the external drive on the USB port till the kernal loads. Is there a work around this. I read something about editing the Linuxrc file, but I cannot find the file in my distro. Any help is appreciated.
- 09-28-2010 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,935
You have Debian and w2k on your internal hard drive?
They both boot?
You said you could boot Debian so post the output of the fdisk -l command as well as the contents of its menu.lst file to get specific help. Before running the command, make sure your external is attached.
- 09-28-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
Thanks for responding it so quickly.
Yes they both are booting fine. Here is the output of fdisk -l
And the contents of menu.lst areCode:Disk /dev/hda: 80.0 GB, 80000000000 bytes 255 heads, 63 sectors/track, 9726 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000080 Device Boot Start End Blocks Id System /dev/hda1 1 5 40131 de Dell Utility /dev/hda2 * 6 1950 15623212+ 7 HPFS/NTFS /dev/hda3 1951 9488 60548985 83 Linux /dev/hda4 9489 9726 1911735 5 Extended /dev/hda5 9489 9708 1767118+ 83 Linux /dev/hda6 9709 9726 144553+ 82 Linux swap / Solaris Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x874cc351 Device Boot Start End Blocks Id System /dev/sda1 * 1 1275 10241406 83 Linux /dev/sda2 1276 8730 59882287+ 83 Linux /dev/sda3 8731 9729 8024467+ b W95 FAT32 VRghatix1:/boot/grub#
VRghatix1:/boot/grub#Code:VRghatix1:/boot/grub# cat menu.lst # menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-legacy-doc/. ## default num # Set the default entry to the entry number NUM. Numbering starts from 0, and # the entry number 0 is the default if the command is not used. # # You can specify 'saved' instead of a number. In this case, the default entry # is the entry saved with the command 'savedefault'. # WARNING: If you are using dmraid do not change this entry to 'saved' or your # array will desync and will not let you boot your system. default 0 ## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry # (normally the first entry defined). timeout 5 # Pretty colours color cyan/blue white/blue ## password ['--md5'] passwd # If used in the first section of a menu file, disable all interactive editing # control (menu entry editor and command-line) and entries protected by the # command 'lock' # e.g. password topsecret # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ # password topsecret # # examples # # title Windows 95/98/NT/2000 # root (hd0,0) # makeactive # chainloader +1 # # title Linux # root (hd0,1) # kernel /vmlinuz root=/dev/hda2 ro # # # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default options below ## DO NOT UNCOMMENT THEM, Just edit them to your needs ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specific kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro ## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro # kopt=root=/dev/hda3 ro ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,2) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## additional options to use with the default boot option, but not with the ## alternatives ## e.g. defoptions=vga=791 resume=/dev/hda5 # defoptions=quiet ## should update-grub lock old automagic boot options ## e.g. lockold=false ## lockold=true # lockold=false ## Xen hypervisor options to use with the default Xen boot option # xenhopt= ## Xen Linux kernel options to use with the default Xen boot option # xenkopt=console=tty0 ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(single-user) single # altoptions=(single-user mode) single ## controls how many kernels should be put into the menu.lst ## only counts the first occurence of a kernel, not the ## alternative kernel options ## e.g. howmany=all ## howmany=7 # howmany=all ## should update-grub create memtest86 boot option ## e.g. memtest86=true ## memtest86=false # memtest86=true ## should update-grub adjust the value of the default booted system ## can be true or false # updatedefaultentry=false ## should update-grub add savedefault to the default options ## can be true or false # savedefault=false ## ## End Default Options ## title Debian GNU/Linux, kernel 2.6.26-2-686 root (hd0,2) kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda3 ro quiet initrd /boot/initrd.img-2.6.26-2-686 title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode) root (hd0,2) kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda3 ro single initrd /boot/initrd.img-2.6.26-2-686 ### END DEBIAN AUTOMAGIC KERNELS LIST # This is a divider, added to separate the menu items below from the Debian # ones. title Other operating systems: root # This entry automatically added by the Debian installer for a non-linux OS # on /dev/hda2 title Microsoft Windows 2000 Professional root (hd0,1) savedefault makeactive chainloader +1 # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hda5. title Debian GNU/Linux (5.0.5) (on /dev/hda5) root (hd0,4) kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda5 initrd /boot/initrd.img-2.6.26-2-686 savedefault boot # This enty was manully added by Sudhir for Oracle Enterprise Linux splashimage=(hd1,0)/boot/grub/splash.xpm.gz title Enterprise Linux (2.6.18-8.el5) root (hd1,0) kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet initrd /boot/initrd-2.6.18-8.el5.img
I have also tried to replace the last 3 lines from menu.lst with the 3 lines shown below but it does not like the hd1.
map (hd0)(hd1)
map (hd1)(hd0)
chainloader (hd1,0)+1Last edited by MikeTbob; 09-29-2010 at 12:11 PM.
- 09-29-2010 #4
Multi-boot CD
If you have a cd-rom, you can download my grub CD to boot the USB device. If it works, then copy the menu.lst entry that works.
ww.keepandshare.com/doc/1596179/grub2009-iso-december-4-2009-7-28-pm-788k]grub2009.iso -- December 4, 2009 7:28 pm -- 788k
- 09-29-2010 #5Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
Thanks Wifi-Fanatux for your suggestion. I burned a cd with your GRUB image and booted my machine. I again got the same error 'Error 21: Selected drive does not exist..'. This is the same error that I get when I use my GRUB(boot loader) from my internal drive to boot.
Here is some more information. During the installation of my 2nd Linux(Oracle Enterprise) I choose to write the boot loader to the external drive (2nd drive in this case). Booting from Debian I can navigate and see the /boot/grub folder on this external drive. I am using the 1st partition on the external drive to boot and I have made this partition bootable.
I am thinking some how the hardware is not getting recognized. Thoughts/Suggestions?
- 09-30-2010 #6Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
Help
Does anybody know how to resolve this? Thanks in advance.
- 10-01-2010 #7
rootdelay
That's not necessarily bad that you have the same error using the grub cd. At least when using the cd, you'll know that grub will be using the files from the cd and not from the sda drive.
Sometimes because your computer is accessing the usb drive which reads slower than your internal drive, the system tries to boot before the kernel has time to load.
In the menu.lst line that reads:
kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
add the rootdelay=10 which will delay the boot process for 10 seconds, if that works you can try a shorter delay, say 3 or 5 as long as that delays it enough:
kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rootdelay=10 rhgb quiet
- 10-01-2010 #8Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,935
When you initially installed OEL, did you install Grub to the master boot record of that drive?
What happens if you set the external drive to first boot priority in the BIOS? Does OEL boot?
What do the geometry commands from grub show? Login as root, enter grub at the prompt and when you get the grub prompt (grub>)enter: geometry (hd0) - hit the enter key for output then type geometry (hd1). This should enable you to see how grub views your drives since you have different size drives and different partitions.
Is there any particular reason you have a separate /boot partition on that drive?
Have you mounted sda1 to see if your kernel and initrd files are there?
- 10-01-2010 #9Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
Thanks for responding.
Here is what you wanted to know.
Q1)When you initially installed OEL, did you install Grub to the master boot record of that drive?
A: I installed GRUB on the MBR when I installed Debian Linux, BUT not when I installed OEL. For OEL I installed it on the boot partition of external drive(2nd drive).
Q2)What happens if you set the external drive to first boot priority in the BIOS? Does OEL boot?
A:It tries to boot. I get a message 'GRUB' on the screen and it freezes.
Q3)What do the geometry commands from grub show? Login as root, enter grub at the prompt and when you get the grub prompt (grub>)enter: geometry (hd0) - hit the enter key for output then type geometry (hd1). This should enable you to see how grub views your drives since you have different size drives and different partitions.
A:I will answer this from my Linux machine. It will be easy to cut and paste the output from there.
Q4)Is there any particular reason you have a separate /boot partition on that drive?
A
o you mean the Boot Flag? . If yes then OEL made me do that on the 2nd drive. I have not gone back to remove the flag from the 1st drive.
Q5)Have you mounted sda1 to see if your kernel and initrd files are there?
A:Yes. Actually when i boot Debian Linux (DL) it automatically mounts to
'/media/_' node. I can see all the complete file structure including the kernel and initrd under /media/_/boot.
- 10-01-2010 #10Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
Here is the screen shoot for the 3rd question from earlier posting
Q3)What do the geometry commands from grub show? Login as root, enter grub at the prompt and when you get the grub prompt (grub>)enter: geometry (hd0) - hit the enter key for output then type geometry (hd1). This should enable you to see how grub views your drives since you have different size drives and different partitions.
A:
grub> geometry (hd0)
drive 0x80: C/H/S = 0/255/63, The number of sectors = 156250000, /dev/hda
Partition num: 0, Filesystem type unknown, partition type 0xde
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type is ext2fs, partition type 0x83
Partition num: 5, Filesystem type unknown, partition type 0x82
grub> geometry (hd1)
drive 0x81: C/H/S = 0/255/63, The number of sectors = 156301488, /dev/sda
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
Partition num: 2, Filesystem type is fat, partition type 0xb
Since my posting from yesterday, I have made a little progress. I have enabled the option to emulate USB on the BIOS. Since then I am able to select booting sequence. Now I can choose to boot from USB drive before the BIOS supported drives ( Internal HD and CDROW drive). Also when I try to boot the OEL via the GRUB on the 1st drive, I get a 'Kernel panic=not syncing: VFS to mount root fs on unknown block(0,0)' error. Not sure if I need a separate thread for it



