Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 27
The problem with booting from the USB drive is that grub on the USB drive will consider the USB drive the 0 drive. When booting from the MBR grub from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined! Wifi-Fanatux's Avatar
    Join Date
    Mar 2009
    Location
    Northwest
    Posts
    20

    Booting from the USB


    The problem with booting from the USB drive is that grub on the USB drive will consider the USB drive the 0 drive. When booting from the MBR grub from your internal drive will consider the USB drive as the 1 drive.... IN MOST SITUATIONS:

    If you have other devices plugged into additional USB ports, the BIOS will label each device in the order it recognises. I have had my USB drive recognised in different orders from my USB mouse as well as a flash drive even though I had used the same USB plugs. The safest way was to only have the USB drive plugged in, and wait until it booted before plugging in other USB devices. Eventually, I assigned UUID's to the partitions, but if I added new partitions to the drive, then the UUID's would change.

    One thing I noticed in your menu.lst was:
    splashimage=(hd1,0)/boot/grub/splash.xpm.gz
    What I gather from your original post is that after selecting the "Enterprise Linux (2.6.18-8.el5)" selection, grub presents the ERROR 21 message immediately. You are not first given a new grub menu which shows the splashimage from the Oracle Linux grub, or are you? This is important, because it will determine which grub is loading, the internal or USB.

    To find your UUID numbers, boot into your Debian system and open a terminal.
    You can use:
    # ls -l /dev/disk/by-uuid
    OR
    # blkid
    to list the UUID by device numbers. If you see the Oracle Linux partition listed, then you know you system is recognizing it.
    Then in your menu.lst, add another selection (you don't have to copy over the other):

    title Enterprise Linux (by UUID)
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.18-8.el5 ro root=UUID=(ENTER LONG STRING OF NUMBERS) rhgb quiet
    initrd /boot/initrd-2.6.18-8.el5.img

    If you can get at least a kernel panic from accessing the root partition from the grub on the MBR, then we can work on getting the system initializing next.

  2. #12
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    Thanks Wifi-Fanatux. Your suggestion makes sense. Actually if you see my last post I have mentioned that I was able to get to Kernel Panic screen. I am now lost after that. Followed quite a bit of suggestion from the web about adding kernel parameters like bootdelay, ACPI, PCI etc but could not get it past the Kernel Panic screen. Since I am on a different computer I cannot give you the exact error message but I have it in my earlier post.

    Also I got rid of the splashimage because it was not doing anything and I have no need to get fancy till my system works.

  3. #13
    Just Joined! Wifi-Fanatux's Avatar
    Join Date
    Mar 2009
    Location
    Northwest
    Posts
    20

    Using the USB grub

    Since you did install a grub bootloader onto the 1st partition of the USB drive, and you can change the boot order on the BIOS to load the USB drive 1st, lets edit the menu.lst for the grub directory in the Oracle root partition.

    Unless you have a live CD which allows root access to the USB drive (Mepis is a great live distro to do this with in root mode) you will need to boot into your debian system.

    Then su in a terminal and open a file manager (not sure what window mgr you are using, konqueror-kde, thunar-xfce, nautilus-gnome) just type in the name of the file manager and you will open it up in root (very dangerous). In your root directory, create a folder named "sda1"

    Then in your terminal (still as su):
    mount /dev/sda1 /root/sda1

    You should then be able to goto your root directory in the file manager and view the sda1 files. Goto the /boot/grub/menu.lst file for the Oracle linux and open the file, which should open it with an editor in su mode.

    Remember what I wrote about how grub on the different drives consider their own drives the hd0 drives? Check to see if the entries on the menu.lst show (hd0,0):
    title Enterprise Linux (2.6.18-8.el5)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.18-8.el5.img

    If not change the hd1 to hd0, and if you have the UUID, you can also use that for the root=UUID=######.

    Then save the menu.lst and reboot with the USB drive as first to boot in BIOS, or use the grub CD which uses a chainloader to load the USB grub on the 1st partition. I think I placed a ERROR 21 response on the grub CD to perform a ctrl-alt-del to reboot the CD while the computer is still on. Sometimes grub loads before the BIOS has time to locate the USB drive when bootloading from a powered off system, but when using the ctrl-alt-del and then selecting the USB device from the CD, it will work. I have had the problem on some machines like the Phoenix BIOS CPUs, and from what I have searched in forums is that there is no fix for the problem. It will work sometimes and other times needs the ctrl-alt-del to work.

    Hope that helps, I work full-time and will check back on this thread to help you, but I am not a 24-7 linux geek. But helping you will be my first check.

  4. #14
    Just Joined! Wifi-Fanatux's Avatar
    Join Date
    Mar 2009
    Location
    Northwest
    Posts
    20

    Editing menu.lst

    I looked at an old USB install I had used with the chainloader, and the menu.lst still had the (hd1,0).

    So, just to be safe, ad two entries to the OEL menu.lst:

    title Enterprise Linux (hd0,0)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.18-8.el5.img

    AND

    title Enterprise Linux (hd1,0)
    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

    But I would still use UUID # for root in the kernel parameters.

    (also, if you can, post the OEL menu.lst so I can see what it is using for the menu)
    Last edited by Wifi-Fanatux; 10-02-2010 at 11:04 PM.

  5. #15
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    First of all thanks for taking time out of your busy schedule and responding to me.
    I agree with you on the sequencing of the USB drive between a cold boot and a warm boot. During the former the fdisk -l shows the USB drive as 'sdb' but on a warm boot ( Ctrl-Alt-Del or reboot command from the terminal as user root) it shows as 'sba'.
    But the Kernel panic messages are the same when I boot either ways.

    Here is the original listing from menu.lst from the OEL install.

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd1,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sda1
    # initrd /boot/initrd-version.img
    #boot=/dev/sda1
    default=1
    timeout=5
    splashimage=(hd1,0)/boot/grub/splash.xpm.gz
    hiddenmenu
    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
    title Other
    rootnoverify (hd0,1)
    chainloader +1

    Below is after I modified it with your suggestion of UUID, commenting the splashimage + hiddenmenu lines and additional stanza for hd0.

    VRghatix1:/home/sp# cat /media/_/boot/grub/menu.lst
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd1,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sda1
    # initrd /boot/initrd-version.img
    #boot=/dev/sda1
    default=1
    timeout=5
    #splashimage=(hd1,0)/boot/grub/splash.xpm.gz
    #hiddenmenu
    #
    title Enterprise Linux (2.6.18-8.el5)
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.18-8.el5 ro root=UUID=35922fbc-4c7c-4ccd-a73f-360a98347d19 rhgb quiet
    initrd /boot/initrd-2.6.18-8.el5.img
    #
    title Enterprise Linux (2.6.18-8.el5)for (hd0,0) Custom Entry.
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-8.el5 ro root=UUID=35922fbc-4c7c-4ccd-a73f-360a98347d19 rhgb quiet
    initrd /boot/initrd-2.6.18-8.el5.img
    #
    title Other
    rootnoverify (hd0,1)
    chainloader +1
    VRghatix1:/home/sp#

    After making the above changes, I changed my boot order in my BIOS to boot from the USB drive. Again all I got was word 'GRUB' in the top left corner and the machine freezes.
    Question here - If I switch my boot order in the BIOS, does the system look for MBR on the USB drive or does it read from the partition directly. I understand GRUB can be loaded in two different ways, from the MBR and from the partition.

    Here is some more thing I tried with a warm boot.
    I added the UUID to the menu.lst on my internal drive for the OEL entry. Again I ended up with Kernel Panic message. Below is the message on the screen as I copied it on a piece of paper and typed it below.

    Booting 'Enterprise Linux (2.6.18-8.e15) for (hd1,0)'

    root(hd1,0)
    Filesystem type is ext2fs, partition type 0x83
    Kernel /boot/vmlinuz-2.6.18-8.e15 ro root=UUID=35922fbc-4c7c-4ccd-a73f-360a98347d19 rhgb quiet
    [Linux-bxImae, setup=0x1e00, size=0x1ad034]
    initrd /boot/initrd-2.6.18-8.e15.img
    [Linux-initrd @ 0x1ffef000, 0x32 bytes]

    ACPI:Getting cpuindex for acpiid 0x2 NOTE: After this message the screen pauses for good 5-10 sec before I get the next message.
    Kernel panic-not syncing:VFS:Unable to mount root fs on unknown-block(0,0)

  6. #16
    Just Joined! Wifi-Fanatux's Avatar
    Join Date
    Mar 2009
    Location
    Northwest
    Posts
    20

    Boot Problems

    Question here - If I switch my boot order in the BIOS, does the system look for MBR on the USB drive or does it read from the partition directly. I understand GRUB can be loaded in two different ways, from the MBR and from the partition.

    I believe it looks for the partition that is tagged bootable on the usb drive.

    If using the UUID rather than a label/ then it may have to do with the initrd because the label/ is assigned by the initrd, (which will more than likely be the assigning used in the fstab as well).

    Make sure you have the initrd image "initrd-2.6.18-8.el5.img" in the boot directory.

    Add the rootdelay=10 into the parameter on the entry that got you to the kernel panic error.

    Check to see if the OEL offers a failsafe kernel in the /boot directory, and make an entry to the menu.lst to load that kernel. If not add a new menu.lst entry, copying the entry above and adding these parameters to the kernel line (You can name the title something like Enterprise Linux (Failsafe):
    ide=nodma apm=off acpi=off noresume nosmp noapic edd=off

    Did you install the OEL from a live cd/dvd? If so, you can copy the initrd image from that and try that image since it allowed you to install the system.

  7. #17
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    I added rootdelay=10 and tried to boot from the internal drive but it did not work. I created a new stanza on my internal drive's copy of menu.lst with all the additional options for the kernel line as suggested along with the rootdelay option but still I got the Kernel panic error.

    Then I tried to comment the initrd line and boot but still gave me Kernel panic error. I do have the initrd file in the /boot folder..

    I only have 1 kernel file in the /boot folder on the USB drive (OEL one), don't see any FailSafe Kernel file in that folder.

    I used the Disk 1 of 5 that I downloaded from the Oracle's eDelivery site to do the install and boot.. I don't know if you call that LiveCD.

    Then I disabled boot from internal drive and changed the boot sequence to boot from the USB drivet. Next I booted OEL from the CD ( 1 of 5 disk ) installed it again on the USB drive, made the 1st partition on the USB drive bootable and installed the GRUB on the MBR. But the system did not recognize the USB drive as a boot device and gave me BIOS error of F1 - To reboot , F2- To change setup kind of error. I will try later to create a bootable USB stick for Debian Linux and see if the BIOS error message goes away.

    Other then that I think I am running out of options.

    Question - Can I repartition my Debian Linux without loosing anything. I will like to squeeze the partition so I can add a new partition for the OEL on the internal drive. I was able to do that with Windows 2000 partition but don't know if Linux allows it. I will then use the external drive for Data. If it is doable can you point me in the right direction. I appreciate you taking time to help me on this along with your full time job.

  8. #18
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I believe it looks for the partition that is tagged bootable on the usb drive.
    That is for windows only. Linux does not need a partition marked active to boot.

    I understand GRUB can be loaded in two different ways, from the MBR and from the partition.
    When you set a drive to first boot priority in the BIOS, the computer will look at a specific physical location on that drive which is where the master boot record is. From there, the bootloader (grub in this case) takes over. You indicated earlier that you did not install Grub to the mbr of the second drive so when you set it to first boot priority, there is no reason it would boot. Don't know if you have changed that?

    If you are booting from Debian on the first drive, the entry pointing to the kernel should work if the kernel and initrd files are actually on that partition. Don't know why you created a separate boot partition on the second drive. Are your kernel and initrd files on the first partition of the drive or on the root partition (2nd) or have you changed this since the reinstall?

  9. #19
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    That is interesting. So to start of with let me make clear all the files including kernel and initrd for OEL are on the 2nd drive. This is my USB external drive.

    If I create a folder on the Debian Linux partition and place the OEL kernel and initrd files in it ( I will actually copy all files in the /boot folder of my USB drive(2nd drive)), and make changes to the file path for the kernel and initrd lines in the menu.lst file on my internal drive, the system should boot into OEL. Is that correct?

  10. #20
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    So to start of with let me make clear all the files including kernel and initrd for OEL are on the 2nd drive
    Understand that, but in your original fdisk -l output it showed you had two separate partitions on the second drive with OEL. You made reference to a boot partition which it would seem you have? you had two partitions, was one of them a boot partition? Setting a partition active is a different thing. Also, having a separate boot directory(folder) is not the same as having a separate boot partition.

    I'm at a loss to explain why this doesn't work. You indicate your Debian device.map has (hd1) as sda which should be the OEL install. However, later you indicate the naming is different when you do a cold boot as opposed to a warm boot? Your grub output shows (hs1,0) as 0x83 which is a Linux partition on the second disk (OEL)?

    I understand you reinstalled OEL and it again failed? The only thing I can think which might help is if you installed OEL on one partition without a separate boot partition. Maybe you've done this and I'm not understanding what you said?

    Your suggestion in your last post regarding placing OEL kernel and initrd files in a Debian folder, I can't see how that would work.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •