Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 27 of 27
Actually I have 3 partition on my 2nd drive. 1st. two are Linux and the 3rd. is FAT32 or VFAT. I have tried various things a) Making 1st partition bootable ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14

    Actually I have 3 partition on my 2nd drive. 1st. two are Linux and the 3rd. is FAT32 or VFAT. I have tried various things a) Making 1st partition bootable and installing GRUB on this partition. b) Making the 1st partition non-bootable and installing GRUB on it. c) Making the 1st partition bootable and writing GRUB to the MBR of the second drive. In the 3rd case I had made my 2nd drive to boot first but I got message something like "Cannot find boot device". So I could not really test the 3rd option.

    Coping the OEL kernel files on the 1st drive proved one thing and that is OEL kernel file were being read from the location I mentioned in the menu.lst file. The boot failed because it could not find the modules in the folders it was looking for.

    I am not sure why my machine cannot recognize the 2nd drive for booting. To test that I am going to install Windows 2000 on that drive after repartitoning to eliminate hardware problems.

    My other thought is to start the GRUB from the first drive, get the 2nd drive mounted. then choose option to load OEL from the 1st drive menu. That way command root (hd1,0) works properly. Can this be done? Will it work? Or do you think I am climbing a wrong tree. Thank

  2. #22
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Actually I have 3 partition on my 2nd drive. 1st. two are Linux and the 3rd. is FAT32 or VFAT
    I see that in your fdisk output. My question is, why two Linux partitions and what are they. Years ago, boot files needed to be at the beginning of the drive but this has not been necessary on computer built in the last 9-10 years. Generally, if someone has a separate boot partition, they have it on the first boot drive. I have never actually used a separate boot partition but the preceding is my understanding.

    I have tried various things a) Making 1st partition bootable and installing GRUB on this partition
    It would only be possible to boot it from the second drive by using the bootloader on the first drive in this situation.

    Making the 1st partition non-bootable and installing GRUB on it.
    The same situation as above.

    When you run the fdisk command, you should see at least one partition marked with an asterisk (*) under the boot column which means it is active. It has always been my understanding this is not necessary to boot a Linux distribution but it is to boot any windows version.

    Making the 1st partition bootable and writing GRUB to the MBR of the second drive
    Again, no need to make it bootable (marked active) but doesn't really harm anything. This should work if you are able to set that drive to first boot priority in the BIOS.

    I am not sure why my machine cannot recognize the 2nd drive for booting. To test that I am going to install Windows 2000 on that drive after repartitoning to eliminate hardware problems.
    You will probably need to set that drive to first boot priority to boot it, otherwise you will need to map drives from Debian Grub. Maybe not, I'm not sure about windows. Haven't used it for years so this might be an interesting experiment?

    My other thought is to start the GRUB from the first drive, get the 2nd drive mounted. then choose option to load OEL from the 1st drive menu
    I'm not sure what you mean? You should be able to access the OEL files that way but I doubt you could boot it. You have accessed your OEL files from Debian previously? Correct? You do have an option to select booting from the USB drive in your BIOS? Have you tried just putting a chainloader entry for OEL in your Debian menu.lst. I sometimes do that when the kernel/UID entries don't work right off. Have you tried installing OEL to just a root partition without a separate boot partition or do you not have a separate boot partition anymore?

  3. #23
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    Quote Originally Posted by yancek View Post
    My question is, why two Linux partitions and what are they.
    I wanted a common Linux partition for Debian and OEL. Say something like a Data partition.
    When you run the fdisk command, you should see at least one partition marked with an asterisk (*) under the boot column which means it is active. It has always been my understanding this is not necessary to boot a Linux distribution but it is to boot any windows version.
    Yes I have the asterisk on the 2nd partition on Drive 1 and on 1st partition on Drive 2. Actually I don't understand the difference between Active and Boot partition. I was hoping the Bootloader will take over once I install the bootloader on the MBR of the 2nd drive during the install of OEL. Meanwhile I set my USB drive to boot before other drives. I also made the 1st drive non bootable from the BIOS.
    You have accessed your OEL files from Debian previously? Correct? You do have an option to select booting from the USB drive in your BIOS? Have you tried just putting a chainloader entry for OEL in your Debian menu.lst.
    Yes I can access OEL files from Debian.
    Yes I have the option of booting from USB drive
    No I have not tried to do the chainloader entry. I will give it a shot.

  4. $spacer_open
    $spacer_close
  5. #24
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I wanted a common Linux partition for Debian and OEL. Say something like a Data partition.
    OK, that should work. You will need to mount that partition in both OEL and Debian and to have permanent access to it, put an entry for it in both the Debian/OEL /etc/fstab files. If you created this partition on that drive during the OEL install, you should already have that entry in its fstab file.

    Actually I don't understand the difference between Active and Boot partition.
    Actually partitions are usually referred to as active or bootable and the terms are often used interchangeably. There are various reasons for having a separate boot partition. Older computers could not boot anything that was not on the first 1024 cylinders but that hasn't been a problem for over ten years. There are other reasons some people still create a separate boot partition but it is no longer necessary unless you have a real old machine. A boot partition is not the same as a boot directory or folder. I've never used a separate boot partition myself so I hesitate to get too involved in trying to explain it but, if you are interested, there are lots of sites with explanations.

    I was hoping the Bootloader will take over once I install the bootloader on the MBR of the 2nd drive during the install of OEL. Meanwhile I set my USB drive to boot before other drives. I also made the 1st drive non bootable from the BIOS.
    Quote:
    If you install Grub to the mbr of the external drive, then you need to have the external drive set to first boot priority. If you had your other drive attached during the install of OEL, its Grub should have detected Debian and windows. That has been my experience with most (but not all) Linux installs. You should then be able to boot Debian, windows and OEL from the second drive. You should be able to do the same booting from the first drive (Debian) but in that case, you would need to make a manual entry in the Grub menu.lst file for OEL which is what you have been trying to do.

    Why did you make the first drive (Debian and windows?) non-bootable? Does that mean you are now booting everything from the second drive?

    I have no experience with OEL and don't know if their system or installation method as well as Grub files are different than the standard.

    What exactly are you able to do now. I assume you still cannot boot OEL?
    Did you create a boot partition or just a data partition on your second (OEL) drive.

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

    One more try

    I usually write GRUB to the first partition on an external drive, I am not positive, but I kinda recall that some BIOS can only select the boot sector (MBR) on the internal drive maybe having something to do with the order of how the BIOS begins the boot process, and it assigns a label to the internal drive's first sector. I am not too sure about OEL either, and thought I'd give it one more try.... I was looking at some notes I saved years ago before USB installs became popular, and the initrd.img had to be recompiled for the loading of modules would work. As to why it won't work with a 2.6.26-2-686 kernel I do not know. But here are some helpful tips to run through (not sure where I originally copied them from, but worked years ago on older distros, I do not need to go through these steps anymore):
    ---------------------------------------------------------------------------------
    GRUB groot:

    Finding groot

    First, figure out what Grub names the drives. This is listed in /boot/grub/device.map. There you will find a table of Grub-style names (e.g. (hd0)) and Linux-style names (e.g. /dev/hda/). You need to know what drive and partition /boot is on. To find where /boot is, use df:
    df /boot
    This should tell you the Linux-style partition name where /boot is. Then simply match it with the Grub-style name in device.map. This is what groot should be.
    Example:

    $ df /boot
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda5 46M 15M 30M 33% /boot

    $ cat /boot/grub/device.map
    (hd0) /dev/hda
    (hd1) /dev/sda
    So groot should be (hd1,4) (note that Grub partition numbers are always one less than Linux numbers). Thus in /boot/grub/menu.lst,
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd1,4)
    Finding kernel root

    The other piece of the puzzle is telling the kernel where / is. Simply find out where / is mounted.
    df /
    This is what root should be in kopt.
    Example:

    $ df /
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 14G 8.3G 5.0G 63% /
    / is on /dev/sda3. Because this is going to be passed to the kernel, there's no need to translate to Grub notation. The 'ro' causes the kernel to mount the drive read-only initially; later the drive will be remounted read/write. This is generally done so fsck can run on / at bootup.
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specifiv 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=root=/dev/sda3 ro
    In summary, groot is where /boot is, and is what Grub sees that drive as. kopt=root is where / is, and is what the kernel sees that drive as.
    ---------------------------------------------------------------------------------------
    Editing module configuration and recompiling the initramfs:


    Edit the following files in failsafe mode or use a live CD with root privileges (like Mepis) or use installed linux distro that is bootable (you can use another editor if not in failsafe mode, and make sure you edit the files in the correct partition, ie. don't copy/paste).

    ( STEP 1 ) Run vim to edit the modules file to make sure USB support is added/loaded during the linux operating system startup ...

    vim /etc/mkinitramfs/modules <enter>

    Right below the last line of text, enter these lines ...

    ehci-hcd
    usb-storage
    scsi_mod
    sd_mod

    Be sure to save the file changes (using : x)

    ( STEP 1b )

    OR (some need this order):
    ehci-hcd
    uhci-hcd
    usb-storage
    usbcore
    usbhid
    scsi_mod
    sd_mod

    ( STEP 1c )

    OR (some need this order-probably preferred):
    usb-storage
    usbcore
    usbhid
    ehci-hcd
    uhci-hcd
    scsi_mod
    sd_mod

    ( STEP 2 ) Run vim to edit the initramfs.conf file to make sure enough time elapses for USB support to load before the linux operating system gets running ...

    vim /etc/mkinitramfs/initramfs.conf

    At the very top of this file, add this line which tells the linux operating system to pause for 12 seconds before starting up ...

    WAIT=12 (in all caps here, not sure if necessary though)

    Be sure to save the file changes (using : x)

    INSTALL NOTE: Editing these two files loads the necessary commands to get USB support going so the linux operating system will recognize the external USB drive. But we still need to recompile (or recreate) the initrd.img that the linux operating system uses at startup ... so that these edits actually work.

    ( STEP 3 ) Recompile (recreate) the initrd.img file to include USB support from these edited files ...

    mkinitramfs -o /boot/initrd.img-(enter kernel# here) /lib/modules/(enter kernel# here)

    INSTALL NOTE: When you are done with the previous step #3 (and before performing this step), you can run the "ls /lib/modules" command (without the quote marks) from a terminal window to see what kernel version number you should use for this install step.

    ( STEP 4 ) Edit the GRUB bootloader menu file to correct a small error that looks at the wrong drive to boot from ...

    vim /boot/grub/menu.lst

    Navigate down this file until you get to a section where there is a menu list (not commented out ... no #s) that has the linux operating system name(s) listed (and possibly an area listing Windows XP/Vista down below it, if you have XP/Vista installed on another partiton/drive).

    There is a line in these menu choices that has root listed on it and probably has (hd1,0) to the right of it. We need to change this to (hd0,0) and to the other lines accordingly. Why? Because according to GRUB, the external USB drive will be our first drive (hd0,0) and not our second drive (hd1,0) because we loaded GRUB on it's bootsector.

    INSTALL NOTE: You will also want to change a "# groot" line in a section of your menu.lst file that may look something like this ...
    # default grub root device
    # e.g. groot=(hd0,0)
    groot=(hd0,3) <<< CHANGE THIS LINE TO READ # groot=(hd0,0)

    INSTALL NOTE: You may want to change the root line for the Windows XP/Vista section in this file to (hd1,0) just in case you have XP/Vista loaded on an internal drive and want the option to boot into XP/Vista from the GRUB menu. You may have to edit this section whenever you update your kernel version. If you have problems pulling up XP/Vista after a kernel update, check this section of your menu.lst file to see if you need to edit it again.

    Be sure to save the file changes (using : x)

    ( STEP 5 ) Exit out of this terminal window (keep typing exit <enter> until the screen actually says to press enter). Hold down Ctrl-Alt-F1 to get back to the RESCUE MODE terminal window and type exit<enter> to reboot the system.

  7. #26
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14
    Here are some of my observations from y'day night. I had tried this before reading the previous two responses. I will try the suggestions later and then report on it.

    1)
    BIOS error of F1 - To reboot , F2- To change setup kind of error
    Earlier I had mentioned that I was not able to boot from the 2nd drive (My external USB drive). This is now resolved.
    On my BIOS, I have two options
    a) to change the boot priority between the IDE BIOS controlled drives and the USB Drives. Here I had set USB Drive ahead of the other. This setting was correct.
    b) The second option was to select bootable drives. The options were CD-ROM drive and C Drive. This is where I was wrong. Thinking that the internal drive was my C drive and since I did not wish the installation to touch it I had unselected the C Drive as a bootable drive. Per the BIOS the FIRST hard drive in the boot sequence is the C Drive, which in my case would be the 2nd Drive. Then since I wanted to boot from that drive I had to make it bootable. Making it bootable and choosing USB Drive to boot before the Internal drive made this issue go away.

    2) Once the above issue was resolved I got the bootloader to start. But all I got was the word 'GRUB' on the Left side of the screen.
    This was resolved by coping the Stage1, Stage2 and e2fsstage1_5 from the Debian's /boot/grub folder to /boot/grub folder of the OEL install.

    3)The above fix allowed me to get to the Grub Menu on my 2nd drive. Here I was able to go to the command line. I gave the following commands in the order. I made sure all the options for the kernel and initrd line were as we had discussed earlier.
    root (hd1,0)
    kernel /boot/vmlinux......
    initrd /boot/initrd.....
    boot

    I received a screen full of messages, nothing seemed odd. Finally I received the Kernel panic message as before.

    4) At this point I started doubting the OEL kernel files. So I installed the Debian Linux on the 2nd drive after formating the partition. It asked me if I wanted to update the MBR and I said yes. I was thinking it would only affect the 2nd drive. The install was fine and on rebooting the GRUB menu had all the new entries for the Debian Linux's new install on the top, followed by the one for Windows and then more for the Debian Linux for the old install. I was able to boot into various OS from this GRUB menu. Things worked like a charm. This proved I had no hardware problems.

    5) Then I tried to reverse the boot order. To my surprise I found it was still presenting me the GRUB menu on the USB drive. This is when I realized the MBR what I choose to write during the install of Debian Linux on the 2nd drive had overwritten my orignal MBR. To install my orignal MBR I did the following
    - I went to the /boot/grub folder of the earlier Debian install and as a root user typed GRUB.(I don't think this was required because the root command takes care of initilizing the drive number.)
    - This took me to the GRUB prompt. Next I typed the following commands in the order stated
    - root (hd0,2) <---- This is for hard drive 1 and partition 3 (My old Debian Install)
    - setup (hd0) <---- This installed the MBR
    - quit
    After rebooting I was back to booting from the GRUB menu on my first drive. I then made the entry for the new Install in the menu.lst file and was able to boot into the Linux on the 2nd drive and all other OS in that menu.
    So I was able to replicate all what friends at this forum were saying or expecting to happen.

    6) Knowing well the settings for the BIOS and the GRUB and MBR etc were working fine, I ventured back to installing OEL on to the 2nd drive. This time I choose not to write any bootloader information on the MBR or the partition. Then I adjusted entries on the menu.lst on the first drive. Again on trying to boot the OEL I got the Kernel panic message. My suspecion at this time is OEL has some bugs. I will check on Oracle forum and update this thread on my findings.

  8. #27
    Just Joined!
    Join Date
    Sep 2010
    Posts
    14

    Thumbs up Resolved

    I have success atlast. My suspicion about about buggy files was correct. I downloaded the same image files this time on Debian Linux and burned the CD's. Ran the intall program without installing the bootloader and making sure the menu.lst entries were correct and it worked. Thanks for all the help from the forum members.

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

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