How to install and boot 145 operating systems in a PC - Page 11


Page 11 of 12 FirstFirst ... 789101112 LastLast
Results 151 to 165 of 174

Thread: How to install and boot 145 operating systems in a PC

  1. #151
    Join Date
    Sep 2009
    Location
    Toronto
    Posts
    24
    Thanks for your help. I can now manually boot DSL Live from (hd0,1) and I also setup GParted Live in (hd0,2) and can also boot that from the grub prompt.

    I wanted some clarification. The grub prompt is a courtesy of stage1 or stage2? If I don't have Stage2 on any partition, just stage1 in the mbr, will I get the grub prompt?

    Secondly, even though I do have a /boot/grub/menu.lst together with all other grub files in (hd0,0) (the grub only data-partition), why am I not being shown the menu? Why only the prompt?

    Thanks for all your time and help!

  2. #152
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    The stage1 is the part in the MBR. Without stage2 Grub cannot function at all. Since /boot/grub has stage2 therefore stage1 can be hard-coded to boot that file because Grub can read a ext2/3 partition. If Grub is avialable in the root partition of Linux then Grub can boot its boot sector directly by chainloading. The commands
    [code]root (hd0,0)
    chainloader +1
    boot[/code[
    liertally instruct Grub that the root of the system is (hd0,0) where the stage2 and menu.lst can be found. Grub is then asked to sever everything except its 1st sector in the memory and paste into the memory with the +1 position of the boot loader inside boot sector of partition (hd0,). The +1 position is the 2nd sector. That is why I always say Grub is laughingly simple and makes use of the key features of the Legacy partition table better than any other boot loader.

    I have suggested to you to use "configfile" to boot the menu.lst. Does this work? If it works then it proves your menu.lst is executable by Grub. If you still get a Grub prompt then may be you set it up incorrectly, say by putting Grub from sda2 or (hd0,1). You can restore the Grub from (hd0,0) again in a Grub prompt
    Code:
    root (hd0,0)
    setup (hd0)
    and then fire it up immediately by
    Code:
    chainloader +1
    boot
    Last edited by saikee; 09-13-2009 at 06:38 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #153
    Join Date
    Sep 2009
    Location
    Toronto
    Posts
    24
    hi, sorry for the delayed response...
    yes, i can now boot my distros using the following command:

    root (hd0,1)
    configfile /boot/grub/menu.lst

    root (hd0,2)
    configfile /boot/grub/menu.lst

    Thanks for all your help. Appreciate it

  4. #154
    Join Date
    Jul 2009
    Posts
    30

    Lightbulb

    we link to this thread often in emails and on forums!

    thanks!

    .

  5. #155
    Join Date
    Jan 2010
    Posts
    1
    thank you for this howto, saikee. it has really helped, but still confused over a simple part.

    I'm confused about the first two posts, in that grub boots from /dev/hda3, but the boot flag is set to /dev/hda1. How does the computer boot to grub first if boot flag is to /dev/sda1?

    Also, is it correct that you did not install grub in /dev/sda1 or /dev/sda2 because of the 2GB limitations of Dos and Win3.1?

  6. #156
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    maek3rcr129 ,

    Welcome to JustLinux!


    The answer to your questions are

    (1) Only the MS systems (Dos and Windows), Solaris and BSD systems boot loaders use the booting flag. Linux's Lilo and Grub never use it. Typically a MS systems stage1 boot loader (it doesn't have a name) searches the 4 primaries in the partition table and boot whichever one that has the booting flag switched on. We can place Grub inside a Fat partition, set it bootable and use Xp, Vista or Win7 boot loader to boot up Grub. I have demonstrated it in this thread.

    (2) My thread was written when Linux still called the IDE disks as hda, hdb, hdc and hdd whereas sda, sdb etc were reserved for Sata disks or USB devices. Later kernels now call all disks sda, sdb, sdc etc. I placed Grub in hda3 as a data only partition. Each of all other partitions has an operating system inside and also its own boot loader.

    It is an extreme case to demonstrate that Grub can be anywhere and can exist without an operating system attached.

    If I put Grub inside say Dos or Win3.1 then I can't boot that system because the boot sector would be taken over by Grub.

    In a normal case one can use a Grub from any of the Linux to do the same job. However I thought Linux users may like to know some powerful features of Grub.
    Last edited by saikee; 01-07-2010 at 07:52 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #157
    Join Date
    Jan 2010
    Posts
    2
    Wow! I can't believe I never stumbled upon your amazing guide before now! I also boot dozens of distros, and your info gave me several "why didn't I think of that?" moments.

    One question regarding the 16 partitions per drive issue... could you explain this to me? I have sometimes been able to create such partitions, but then whatever distro I was trying to install refused to use it. Btw, I have just 2 drives one internal SATA and one USB external SATA.

    Thanks again for all your efforts!

  8. #158
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    claudecat,

    Welcome to JustLinux!


    The 16 partitions should be thought of 16 device names.

    It has been long established, when we still started using Sata hard disks, tha total of 256 devices in the hard disk controllers. The kernel has long been written to permit 16 devices names per IDE/Sata/SCSI/USB hard disk. Since sda the whole hard disk is also a device name there effectively we can only have 15 partitions. Also one of the primaries must be converted to an extended partition and cannot store data therefore a hard disk has only 14 bootable partitions.

    The partitioning tools between Gparted, fdisk, cfdisk, sfdisk, parted, etc, etc maintained to different vigor and while one allow more than 16 device names other may not.

    Theoretically kernel newer than 2.6.28 should have no limitation on the number of partitions! However the various programs have not been revised to catch up with the changes in the kernel. More details in this thread

    Another complication is the kernel can be newer than 2.6.28 and the partitioning tools are ready to exceed 16 device names but the distro's installer may not have been written to go beyond the 15th partition. This is the most common irritation.

    The problem can be resolved tempoarary if you are willing to install the distro in one of the first 15 partitions and then move it to a higher partition. This is how I deal with them and most distros with new kernels will have no problem with the relocation.

    Personally I believe Linux is ready to be installed into high number partition as Grub has no problem of booting it. The problem is with the partitioning tools because we still need them to be robust for sorting partition table if something goes south.

    The partitioning tool that is currently able to create most number of partitions is one of the oldest "sfdisk". The graphic Gparted is pretty good too but one can write a script to create 130 partitions in seconds with sfdisk , as I demonstrate in this thread.

    In general I would recommend sticking with cfdisk as the partitioning tool. It supports 64 device names so 63 partitions is the maximum. I would also limit the number of partition to a lower threshold of 60 because any space/gap between partitions (forced upon by the BSD/Solaris distros and MS Windows) attracts an allocation of device name.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #159
    Join Date
    Jan 2010
    Posts
    2
    Thanks for the welcome and the information. Plenty of ideas for future learning/projects. You are one amazingly grub/partitioning knowledeable human :=}

  10. #160
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    4

    Unhappy Problem with booting Linux Mint 8

    Hello saikee,

    i have read the most of the postings in this thread but found no solution for my problem with Linux Mint 8...

    My USB disk structure is:
    Code:
    Device      Part.Type  Format   Label   Marks
    /dev/sdc1   primary    fat32    boot    boot
    /dev/sdc2   extended
    /dev/sdc5   logical    linux-swap
    /dev/sdc6   logical    ext2     Dream
    /dev/sdc7   logical    ext2     Arcade
    /dev/sdc8   logical    ext2     Mint
    /dev/sdc9   logical    ext2     Sabyon
    /dev/sdc3   primary    fat32    HOME
    First i installed DreamLinux 3.5 Gnome in /dev/sdc6 with grub in MBR and via terminal in /dev/sdc6 and copied the boot folder from /dev/sdc6 to /dev/sdc1.

    Seccond i installed Linux Mint 8 Helena and its grub in /dev/sdc8.

    The menu.lst on /dev/sdc1:
    Code:
    color red/black red/light-gray
    
    title This is the frequently use Linux booting menu
    
    boot
    title DreamLinux @ sda6
    root (hd0,5)
    chainloader +1
    
    title Puppeee Arcade @ sda7
    root (hd0,6)
    chainloader +1
    
    title Linux Mint @ sda8 via chainloader
    root (hd0,7)
    chainloader +1
    
    title Linux Mint @ sda8 via core.img
    root (hd0,7)
    kernel /boot/grub/core.img
    savedefault
    boot
    
    title Sabayon Linux @ sda9
    root (hd0,8)
    chainloader +1
    If i select DreamLinux it boots the DreamLinux menu and from there it boots DL like it should.

    If i select "Linux Mint @ sda8 via chainloader" grub tells me:
    Code:
    Error 13: Ivalid or unsupported executable format
    
    Press any key to continue...
    If i select "Linux Mint @ sda8 via core.img" grub tells me:
    Code:
    , bss=0x0
    Error 15: File not found
    
    Press any key to continue...
    Linux Mint 8 Helena uses /boot/grub/grub.cfg as boot meu seems it uses grub2...
    Can you help me?



    Greetings from Germany
    Luemmel

  11. #161
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    luemmel,

    Welcome to Justlinux!


    If you boot a Linux using "chainloader +1" it will work only if its Grub has been installed in the root partition. In the case of Linux Mint in sdc8 that means /dev/sdc8. Legacy Grub or Grub1 can boot Grub2 this way. In fact any Grub can "chainload" any PC operating system as long as it has its boot loader residing inside the root partition.

    Grub2 uses grub.cfg and Grub1 uses menu.lst for configuration.

    You can make a Grub2 system installed in its own partition using the Task D2 (with the partition name adjusted for your case) of the Just Booting tips in my signature. If you have used Ext4 in sdc8 then you need a Linux Live CD that can read it.

    If you still have a problem then post the content of grub.cfg here and let us know what filing system of sdc8.

    As regarding your other booting solution of Mint my explanation would be Grub2 is using different commands to Grub1 so the only way to boot a Grub2 system is by chainloading. Alternatively you can make a Grub2 floppy to boot it manually. I believe in such case the commands would be something like
    Code:
    set root=(hd0,8)
    linux kernel /boot/grub/core.img
    boot
    The partition numbering system has been changed in Grub2. Also the command "kernel has been replaced by "linux".

    Good luck.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  12. #162
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    claudecat,

    I see myself just a student in this forum as I was an absolute beginner in Linux when I joined it.

    Many members here are very knowledgeable.

    They are my teachers and have taught me a lot. I am only passing on the knowledge I picked up from them.

    Hope you can benefit from them same as I.
    Last edited by saikee; 04-25-2010 at 08:06 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  13. #163
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    4
    Here is the grub.cfg from Linux Mint 8:
    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s /boot/grub/grubenv ]; then
      have_grubenv=true
      load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
      saved_entry=${prev_saved_entry}
      save_env saved_entry
      prev_saved_entry=
      save_env prev_saved_entry
    fi
    insmod ext2
    set root=(hd0,8)
    search --no-floppy --fs-uuid --set cebf7cd9-6974-4084-87d8-6024cad3d61a
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    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/white
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/06_mint_theme ###
    insmod ext2
    set root=(hd0,8)
    search --no-floppy --fs-uuid --set cebf7cd9-6974-4084-87d8-6024cad3d61a
    insmod png
    if background_image /boot/grub/linuxmint.png ; then
      set color_normal=white/black
      set color_highlight=white/light-gray
    else
      set menu_color_normal=white/black
      set menu_color_highlight=white/light-gray
    fi
    ### END /etc/grub.d/06_mint_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (/dev/sdc8)" {
            recordfail=1
            if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,8)
        search --no-floppy --fs-uuid --set cebf7cd9-6974-4084-87d8-6024cad3d61a
        linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=cebf7cd9-6974-4084-87d8-6024cad3d61a ro   quiet splash
        initrd    /boot/initrd.img-2.6.31-14-generic
    }
    menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (recovery mode)" {
            recordfail=1
            if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        insmod ext2
        set root=(hd0,8)
        search --no-floppy --fs-uuid --set cebf7cd9-6974-4084-87d8-6024cad3d61a
        linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=cebf7cd9-6974-4084-87d8-6024cad3d61a ro single 
        initrd    /boot/initrd.img-2.6.31-14-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### 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 ###
    My thinking was that i can chainloading Linux Mint 8 even it uses grub2, too...

  14. #164
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,961
    I use both Grub1 and Grub2 and can confirm both can chainload each other without any problem.

    Grub1 cannot access a Ext4 partition because it hasn't got the driver for it. The support/maintenance of Grub1 was stopped almost at the time I entered Linux and nothing has been added since Ver 0.97. Therefore the only way you can rescue a Grub2 system is to boot up a Linux Live CD that support Ext4 which is not a problem with modern kernel.

    If your sdc8 has not been formatted in Ext4 then Grub1 can boot it manually using the following information in your grub.cfg:-
    Code:
        set root=(hd0,8)
        linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=cebf7cd9-6974-4084-87d8-6024cad3d61a ro   quiet splash
        initrd    /boot/initrd.img-2.6.31-14-generic
    The equivalent in Grub1 commands would be
    Code:
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.31-14-generic root=dev/sdc8 ro
    initrd    /boot/initrd.img-2.6.31-14-generic
    boot
    Please note the difference in calling the partition. You can use the original UUID to identify the partition but /dev/sdc8 will work and is simpler. The bits changed by me have been marked red.

    Once you are running Linux Mint, go into a root terminal and issue this command to install Grub2 in sdc8
    Code:
    grub-install /dev/sdc8
    Your Linux Mint should be chainloadable from this point onward. One last word it is possible that you may have to do grub-install more than once (if it fails) as there seems to be a bug in Grub2.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  15. #165
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    4

    Unhappy

    Today i've read in another forum that grub2 can't install itself in a logical partition like /dev/sdc8.

    With your solution
    Code:
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.31-14-generic root=/dev/sdc8 ro
    initrd    /boot/initrd.img-2.6.31-14-generic
    boot
    i was able to boot Linux Mint 8 but fail on
    Code:
    grub-install /dev/sdc8
    here is the result:
    Code:
    Asus901Mint luemmel # grub-install --force /dev/sdc8 
    grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR.  This is a BAD idea.
    grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this
    setup by using blocklists.  However, blocklists are UNRELIABLE and its use is
    discouraged.
    Installation finished. No error reported.
    This is the contents of the device map /boot/grub/device.map.
    Check if this is correct or not. If any of the lines is incorrect,
    fix it and re-run the script `grub-install'.
    
    (hd0)    /dev/sda
    (hd1)    /dev/sdb
    (hd2)    /dev/sdc
    (hd3)    /dev/sdd
    The chainloading of Linux Mint 8 fails with the same error messages i've posted before...

Posting Permissions

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