Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24
mizzle; I read the article you suggested. The best I could come up with is to try the idea in the section of the doc titled "Adding a new operating ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13

    mizzle;
    I read the article you suggested. The best I could come up with is to try the idea in the section of the doc titled
    "Adding a new operating system to the GRUB menu".
    I took the approach that I could use the "c" command to get a command line and then give it the info it would need to boot.
    Here is what I keyed into the Grub 0.91 command line: (I'll use "//" on the line for my comments to you)
    grub >root (hd1,0) // the 2nd disk, 1st part.
    File system type is ext2fs, Partition type 0x83 // grub's response to me
    grub >chainloader +1 // my attempt to do what I understood was being suggested by the article and your suggestion about legacy grub chain loading grub 2
    Error 13: Invalid or unsupported executable format // grub's response to me

    I noticed the file system shows as ext4 in Mint -- is that a problem?

    Just so we're clear -- Mint is installed on disk1 (the 2nd hard drive) in the 1st partition (part 0).
    Also, in Mint, /boot is not in its own partition -- its in the partition containing the root file system (/dev/sdb1)

    I'm almost to the point of relenting on my earlier desire to avoid re-installs!
    What do you think?
    Ray

  2. #12
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13
    yancek;
    If I understand you correctly, you're saying I could boot from the 1st disk (hd0) and after getting the legacy grub menu, I could go into intereactive mode where I could supply the 2 commands you gave (root (hd1,0) chainloader +1) and then, if I understand things correctly, rather than Mint being loaded, the bootloader, Grub 2, would be loaded and present its menu and then I could select Mint from that menu to boot it. Is my understanding correct?

    I think I may have tried that approach and got a Error 13: message after the 'chainloader +1' command.

    Ray

  3. #13
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    You said you could boot Red Hat so just put the entry in the /boot/grub/grub.conf file and try it. I use both the options I posted to boot different operating systems using Grub2 on different partitions. Yes, you will get the Red Hat bootloader, then select Mint and get the Mint Grub2 bootloader. With the Grub and Red Hat versions you have I don't see any way you can boot Mint directly.

    I think you would have better luck booting from Mint to xp and Red Hat with the Mint drive set to first boot priority.
    Are you just planning to use your Red Hat for learning purposes? It is extremely old and you could download CentOS for free and use it as it is a free version of Red Hat and has support forums.

  4. #14
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    896
    Don't use the grub command line :/

    You should create a new stanza in your grub.cfg (legacy) like
    title my distro
    root ...
    rootnoverify
    chainloader +1

  5. #15
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13
    yancek;
    I can boot RH on 1st disk by using BIOS to boot 1st disk and then selecting RH from the grub 0.91 menu.
    I'm not sure what you're saying by "so just put the entry in the /boot/grub/grub.conf file and try it."
    What entry? Do you mean put the entry from grub 0.91 file (/boot/grub/grub.conf) in the grub 1.99 file (/boot/grub/grub.cfg) ?

    I may be assuming too much here, but when you mention /boot/grub/grub.conf -- I think you're talking about legacy grub (0.91 in my case)
    and when you are talking about grub 2 (1.99 in my case), then I assume you mean the /boot/grub/grub.cfg file.

    You mention using the 2 entries you posted to boot different OSs on different partitions(using grub2), but have you tried the same thing when the OSs are on differnt drives?

    Or do you think it makes no difference?

    I have no problem with your suggestion of booting Mint and using it to get to the others (Win XP & RH) -- but how? I've been trying that for 2 days now.
    (I can provide the output, under Mint, of the 'df -h' and the 'fdisk -l' commands as well as the contents of /boot/grub/grub.cfg if you'd be willing to look over them and suggest the correct entry to make in /boot/grub/grub.cfg to allow for booting RH.)

    Regarding the use of RH -- Yes, it will be used for training (in Tanzania this summer). I'll be taking quite a bit of software with me rather than depending on network use in a third world country.

    I tried the entries you provided, in grub command line mode and failed.
    I can't remember if I tried them in the /boot/grub/grub.cfg file or not.
    One of the things I did was to edit the entry before grub processed it during the menu presentation.

    Currently, I'm quite skeptical about being able to use grub2 to boot RH without some of the mysterious commands in grub2 that I haven't yet encountered!

    I might have to move on, but I hate not being able to at least explain correctly why something won't work.
    Ray

  6. #16
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13
    yancek;
    Just in case you're interested:
    Code:
    When I boot from 2nd hard drive, Win-XP and Linux Mint 13 boot OK --  BUT
    RH 7.3 will NOT boot even though it shows in the menu!
    (grub is ver. 1.99)
    OUTPUT of commands on Linux Mint 13
    df -h
    
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdb1        36G  3.8G   30G  12% /
    udev            969M  4.0K  969M   1% /dev
    tmpfs           391M  920K  390M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            976M   76K  976M   1% /run/shm
    -----------------------------------------------------
    fdisk -l
    
    Disk /dev/sda: 160.0 GB, 160040803840 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312579695 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xae1eae1e
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   163846934    81923436    7  HPFS/NTFS/exFAT
    /dev/sda2       163846935   163943324       48195   83  Linux
    /dev/sda3       163943325   308496194    72276435   83  Linux
    /dev/sda4       308496195   312576704     2040255    f  W95 Ext'd (LBA)
    /dev/sda5       308496258   312576704     2040223+  82  Linux swap / Solaris
    
    Disk /dev/sdb: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x7fa67fa6
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2048    74102783    37050368   83  Linux
    /dev/sdb2        74104830    78163967     2029569    5  Extended
    /dev/sdb5        74104832    78163967     2029568   82  Linux swap / Solaris
    -----------------------------------------------------
    cat /boot/grub/grub.cfg
    
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      insmod part_msdos
      insmod ext2
      set root='(hd1,msdos1)'
      search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
      set locale_dir=($root)/boot/grub/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/06_mint_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=white/light-gray
    ### END /etc/grub.d/06_mint_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
    	set gfxpayload="$1"
    	if [ "$1" = "keep" ]; then
    		set vt_handoff=vt.handoff=7
    	else
    		set vt_handoff=
    	fi
    }
    if [ ${recordfail} != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
    menuentry 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sdb1)' --class linuxmint --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
    	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79 ro   quiet splash $vt_handoff
    	initrd	/boot/initrd.img-3.2.0-23-generic
    }
    menuentry 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sdb1) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
    	echo	'Loading Linux 3.2.0-23-generic ...'
    	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79 ro recovery nomodeset 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.2.0-23-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/10_lupin ###
    ### END /etc/grub.d/10_lupin ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 57cd46d9-7a3a-4a75-a2a7-da6a8e8dbc79
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
    	insmod part_msdos
    	insmod ntfs
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root F8FCDDF8FCDDB0DC
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    menuentry "Red Hat Linux (2.4.18-3) (on /dev/sda3)" --class gnu-linux --class gnu --class os {
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos2)'
    	search --no-floppy --fs-uuid --set=root 990142e6-8e42-11e2-921f-80f6f1dc4f99
    	linux /vmlinuz-2.4.18-3 ro root=/dev/hda3 hdc=ide-scsi
    	initrd /initrd-2.4.18-3.img
    }
    ### 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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    -----------------------------------------------------

  7. #17
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    The Red Hat system you have including the kernel and the Grub version are so old their only value is as museum pieces. I hope you aren't planning to use this for anything. Things have changed so much in the last 11 years that most of what you learn on this Red Hat version will be useless. If you want something current that is also free, you could download the free version of Red Hat which is CentOS. Your choice.

    Yes, boot Red Hat. As root user, go to the /boot/grub/grub.conf file and put both of those entries in, label them on the title line so you know which is which. Save the file. Reboot and try each entry. See if either/both work. The reason you want to edit the file is so you don't have to put that entry in everytime you boot. You kernel and Red Hat are too old and are totally incapable of booting and ext4 filesystem on Mint which is why you need to chainload. The core.img entry is basically chainloading also.

    Booting from Mint. If you look at your Red Hat grub.conf file it shows grub on sda2 and it shows root on 'hda3'. So you have a separate boot partition for Red Hat.
    I would try changing the 'linux' for Red Hat in the Mint grub.cfg file, the 'root=/dev/hda3' change to 'root=/dev/sda3'. If that doesn't help, you need to check the uuid numbers and make sure they are correct.

  8. #18
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13
    yancek;
    I'm aware of the age of RH 7.3 (when I began with Linux, the kernel was 0.92). I have several current distros of Linux ready for the trip. My efforts here are in the realm of learning.

    I took your advice and put both the entries you suggested in the /boot/grub/grub.conf file. The entry with "kernel /boot/grub/core.img" failed because there is no file called "core.img". The other entry with "chainloader +1" failed with Error 13, as it has before (which I think points to the fact that an ext4 filesystem can't be used with chainloading).

    As to your 2nd paragraph beginning with "Booting from Mint.", I wasn't sure why you mention Red Hat grub.conf showing "sda2" -- I can't find any reference to "sda2" in /boot/grub/grub.conf -- only "hdx" references! However, I did as you suggested and changed the linux entry in /boot/grub/grub.cfg from 'root=/dev/hda3' to 'root=/dev/sda3' and that failed also.

    Rather than persue the uuid numbers, I think I'll put this mystery on the back burner and take up my other issues -- there seem to be no shortage of issues!
    Thanks for your help.
    Ray

  9. #19
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    The entry with "kernel /boot/grub/core.img" failed because there is no file called "core.img"
    That's a problem. I have Mint 13 installed on a partition and it has a core.img file in the /boot/grub/ directory. You might check in Mint, the /usr/lib/grub/i386-pc directory to see if you have the core.img file there.

    The other entry with "chainloader +1" failed with Error 13, as it has before (which I think points to the fact that an ext4 filesystem can't be used with chainloading).
    That's not the problem. I chainload Mint and Ubuntu w/ext4 and Grub2 from a Grub Legacy menu.lst

    There is no mention of 'sda' in the grub.conf, it is hda. Newer systems use sda to refer to any type of drive. Previously, scsi drives were referred to as sda, sdb, etc while IDE drives were hda, hdb, etc. My thought was that Mint might not recognize 'hda' but would 'sda'? When it failes what happened? Any warning/error messages? Have you run sudo os-prober and sudo update-grub from Mint with both drives attached?

  10. #20
    Just Joined!
    Join Date
    Mar 2013
    Posts
    13
    yancek;
    I doubt if the absence of a file called 'core.img' is a problem. Kernel files can be called anything -- it is common to find them named beginning with 'vmlinuz' as is my case.
    If you look at the post I made where I said "Just in case...", you'll see that both Mint and RH use the vmlinuz prefix to name the kernel files.
    However, I looked in /usr/lib/grub/i386-pc on Mint and there was no 'core.img' file.

    As to the issue of 'hda' vs 'sda', again, I suspect its not a problem. To test that idea, I editied the grub 1.99 file from the Mint boot and changed the only reference to 'sda' to 'hda' that occurs in the 'set root' statement and it worked fine.

    You asked me what error I got when I used the 'chainloader +1' and I mentioned in my previous post it was "Error 13", which indicates grub encountered a type of file it can't process (according to the grub 2.0 manual I consulted).

    As to the issue of 'os-prober' and 'update-grub' -- I did not run them as I always had the 2 drives attached to the controller. However, just to be safe, I ran os-prober and it outputted the same info that is in the /boot/grub/grub.cfg file:
    /dev/sda1 ... win-xp
    /dev/sda3 ... RH 7.3

    Therefore I didn't see much reason to run update-grub.

    The Mystery lives on!
    Ray

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
  •