Author Topic: (SOLVED) How to obtain a three boot entry menu  (Read 1067 times)

Offline unist

  • Full Member
  • ***
  • Posts: 158
(SOLVED) How to obtain a three boot entry menu
« on: September 17, 2012, 08:21:35 AM »
If I have two physical hard drives:
•   One with Windows 7
•   The other with PCLOS KDE 2012 fully updated

Where the boot sequence is controlled by grub 0.97 from PCLOS KDE:
•   First boot: Windows 7
•   Second boot: PCLOS KDE 2012

And I have a 8 GB USB pendrive with Knoppix 7.04 DVD that I leave plugged in the USB hub, as if it were a third disk.

How would I edit the boot stanza of my KDE install in order to have Knoppix as a third entry in the boot menu?

Would it be correct to add the following stanza to /boot/grub/menu.list of my KDE install?

title Knoppix 7.04
root (sdb1,0)
configfile /boot/grub/menu.lst

I took this idea from:
http://www.pclinuxos.com/forum/index.php/topic,100575.0.html

I also read this:
http://www.pclinuxos.com/forum/index.php/topic,108776.0.html

But since my Linux knowledge is very limited, I would like to review my idea in order to avoid a costly error in my new equipment.

Thank you.
« Last Edit: September 19, 2012, 06:28:37 PM by unist »
Registered Linux user #547260

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1924
  • Certified Windows Hater
Re: How to obtain a three boot entry menu
« Reply #1 on: September 17, 2012, 10:48:52 AM »

title Knoppix 7.04
root (sdb1,0)
configfile /boot/grub/menu.lst


Assuming that the info given is correct, I think this should work:

title Knoppix 7.04
root (hd1,0)
configfile /boot/grub/menu.lst

You can also use chainloading:

title Knoppix 7.04
root (hd1,0)
chainloader +1


What is the output of the following command as root:
fdisk -l /dev/sdb
« Last Edit: September 17, 2012, 10:53:13 AM by agmg »
For the whole world, you are someone.
For someone, you are the whole world.

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #2 on: September 17, 2012, 10:57:36 AM »
agmg: Thank you for your post. Once I return home I will post the output of fdisk -l /dev/sdb
Registered Linux user #547260

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1924
  • Certified Windows Hater
Re: How to obtain a three boot entry menu
« Reply #3 on: September 17, 2012, 11:03:48 AM »
You can try first adding one of the two entries I've given to your /boot/grub/menu.lst from inside your PCLinuxOS installation and see if you can boot to Knoppix. Nothing will happen if something is wrong. You will get an error message describing the error, you will restart and boot again to PCLinuxOS so we can review our next step... :)
For the whole world, you are someone.
For someone, you are the whole world.

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #4 on: September 17, 2012, 11:55:44 AM »
agmg: O.K, I will try adding the first one of the two entries, and see how it goes. In case this does not work, I will try the second one. Thank you again.  :)
Registered Linux user #547260

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11598
  • ----IOFLU----
Re: How to obtain a three boot entry menu
« Reply #5 on: September 17, 2012, 12:53:14 PM »
agmg: O.K, I will try adding the first one of the two entries, and see how it goes. In case this does not work, I will try the second one. Thank you again.  :)

Being as you already have two real hard drives present, the boot drive will be (hd0) and the second one (hd1). Adding the USB pendrive would make it (hd2), so unless there is something else at work that switches the existing (hd1) with the new (hd2), the new stanza would be;

title Knoppix 7.04
root (hd2,0)
chainloader +1


Check your existing /boot/grub/menu.lst to see what the Windows entry looks like. If the PCLinuxOS drive is the boot drive, (has grub installed to its MBR) the PCLinuxOS stanza's kernel and initrd lines would indicate (hd0,n) with n being the partition number, counting from 0, and the Windows stanza whould be something on the order of;

title Windows
    rootnoverify (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1


If grub is installed to the MBR of the Windows drive, then the PCLinuxOS stanzas will have the kernel and initrd lines indicating (hd1,n) where n is the actual partition number, counting from 0.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1924
  • Certified Windows Hater
Re: How to obtain a three boot entry menu
« Reply #6 on: September 17, 2012, 04:19:26 PM »
agmg: O.K, I will try adding the first one of the two entries, and see how it goes. In case this does not work, I will try the second one. Thank you again.  :)

Being as you already have two real hard drives present, the boot drive will be (hd0) and the second one (hd1). Adding the USB pendrive would make it (hd2), so unless there is something else at work that switches the existing (hd1) with the new (hd2), the new stanza would be;


I stand corrected. I had the impression that it was a dual boot setup and not a dual hard disk one...
My apologies...
For the whole world, you are someone.
For someone, you are the whole world.

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #7 on: September 17, 2012, 08:42:11 PM »
Old-Polack and agmg:
Since I have permanently a 4 GB Pendrive for ReadyBoost in Windows in addition to the 8 GB Pendrive with Knoppix, I am not sure if this one is hd2 or hd3.

Assuming that it is hd2, my proposed /boot/grub/menu.lst, with the additional stanza at the end is:
(I marked in red the lines related to the post of Old-Polack and the new proposed final stanza, and in purple a difference that I found)

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd1,0)/boot/gfxmenu
default 0

title windows
root (hd0,0)
makeactive
chainloader +1


title linux
kernel (hd1,0)/boot/
vmlinuz BOOT_IMAGE=linux root=UUID=e16abe2f-bc1b-4ad3-b96a-55af35463483 quiet nokmsboot vmalloc=256M acpi=on resume=UUID=a3661f3c-06bb-4643-8d35-9615fe60755b splash=silent vga=788
initrd (hd1,0)/boot/initrd.img

title linux-nonfb
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=e16abe2f-bc1b-4ad3-b96a-55af35463483 quiet nokmsboot vmalloc=256M acpi=on resume=UUID=a3661f3c-06bb-4643-8d35-9615fe60755b
initrd (hd1,0)/boot/initrd.img

title failsafe
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=e16abe2f-bc1b-4ad3-b96a-55af35463483 quiet nokmsboot failsafe vmalloc=256M acpi=on
initrd (hd1,0)/boot/initrd.img

title memtest-4.20
kernel (hd1,0)/boot/memtest-4.20 BOOT_IMAGE=memtest-4.20

title 2.6.38.8-pclos3.pae.bfs
kernel (hd1,0)/boot/vmlinuz-2.6.38.8-pclos3.pae.bfs BOOT_IMAGE=2.6.38.8-pclos3.pae.bfs root=UUID=e16abe2f-bc1b-4ad3-b96a-55af35463483 quiet nokmsboot vmalloc=256M acpi=on resume=UUID=a3661f3c-06bb-4643-8d35-9615fe60755b splash=silent vga=788
initrd (hd1,0)/boot/initrd-2.6.38.8-pclos3.pae.bfs.img

title 2.6.38.8-pclos3.bfs
kernel (hd1,0)/boot/vmlinuz-2.6.38.8-pclos3.bfs BOOT_IMAGE=2.6.38.8-pclos3.bfs root=UUID=e16abe2f-bc1b-4ad3-b96a-55af35463483 quiet nokmsboot vmalloc=256M acpi=on resume=UUID=a3661f3c-06bb-4643-8d35-9615fe60755b splash=silent vga=788
initrd (hd1,0)/boot/initrd-2.6.38.8-pclos3.bfs.img

title Knoppix 7.04
root (hd2,0)
chainloader +1


Would this be fine?
« Last Edit: September 17, 2012, 09:09:54 PM by unist »
Registered Linux user #547260

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #8 on: September 17, 2012, 08:49:38 PM »
What is the output of the following command as root:
fdisk -l /dev/sdb

This is the output of fdisk -l /dev/sdb:

[root@localhost ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x360a360a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   608349419   304174678+  83  Linux
/dev/sdb2       608349420   625137344     8393962+   5  Extended
/dev/sdb5       608349483   625137344     8393931   82  Linux swap / Solaris
[root@localhost ~]#

In this physical hard drive of 320 GB is where it is installed PCLOS 2012 KDE
« Last Edit: September 17, 2012, 08:55:41 PM by unist »
Registered Linux user #547260

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #9 on: September 17, 2012, 09:36:34 PM »
Using HardInfo 0.5.1, the output for Filesystems is:

Filesystems
-----------

-Mounted File Systems-
/dev/sdb1   /   10.56 % (255.4 GiB of 285.5 GiB)   
/dev/sdd1   /media/KNOPPIX   99.99 % (992.0 KiB of 7.5 GiB)   

And the output for Storage is:

Storage
-------

-SCSI Disks-
ATAPI DVD A  DH24ABS
ATA WDC WD10EALX-009  (Hard Disk for Windows)
ATA WDC WD3200AAKX-0  (Hard Disk for PCLOS 2012 KDE)
HP V100w                       (this is the 4GB USB Pendrive for ReadyBoost)
Generic STORAGE DEVICE
Generic STORAGE DEVICE
Generic STORAGE DEVICE
Generic STORAGE DEVICE
Generic STORAGE DEVICE
USB 2.0 USB Flash Drive   (this is the 8 GB Pendrive for Knoppix 7.04)
Registered Linux user #547260

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1924
  • Certified Windows Hater
Re: How to obtain a three boot entry menu
« Reply #10 on: September 17, 2012, 11:18:30 PM »
So there are more than 2 disks and the Knoppix USB...

Inside your PCLinuxOS installation, give the following command as root:

fdisk -l

This will show us information of all the disks in your system...
For the whole world, you are someone.
For someone, you are the whole world.

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #11 on: September 18, 2012, 09:23:08 AM »
So there are more than 2 disks and the Knoppix USB...

Inside your PCLinuxOS installation, give the following command as root:

fdisk -l

This will show us information of all the disks in your system...

There are two (02) physical Hard Drives and two (02) USB Pendrives.

What appears as five (05) Generic STORAGE DEVICE is a Belkin Multi Card Reader conected via USB, without any media in.

Tonight I will post the output of fdisk -l
Registered Linux user #547260

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #12 on: September 18, 2012, 07:21:31 PM »
So there are more than 2 disks and the Knoppix USB...

Inside your PCLinuxOS installation, give the following command as root:

fdisk -l

This will show us information of all the disks in your system...

This is the output of fdisk -l:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0xad59c312

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS
/dev/sda2          206848  1953521663   976657408    7  HPFS/NTFS

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x360a360a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   608349419   304174678+  83  Linux
/dev/sdb2       608349420   625137344     8393962+   5  Extended
/dev/sdb5       608349483   625137344     8393931   82  Linux swap / Solaris

Disk /dev/sdc: 4037 MB, 4037017600 bytes
100 heads, 36 sectors/track, 2190 cylinders, total 7884800 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        8064     7884799     3938368    c  W95 FAT32 (LBA)

Disk /dev/sdd: 8086 MB, 8086618112 bytes
255 heads, 63 sectors/track, 983 cylinders, total 15794176 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: 0x04dd5721

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          63    15794175     7897056+   c  W95 FAT32 (LBA)
[root@localhost ~]#
Registered Linux user #547260

Offline unist

  • Full Member
  • ***
  • Posts: 158
Re: How to obtain a three boot entry menu
« Reply #13 on: September 18, 2012, 07:31:45 PM »
Considering the sequence in my previous post, since the last disk recognized, out of the four (04), is the 8 GB Pendrive in which I have Knoppix 7.04, I thing that the last boot stanza for the /boot/grub/menu.lst should be:

title Knoppix 7.04
root (hd3,0)
chainloader +1

Am I correct?
Registered Linux user #547260

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11598
  • ----IOFLU----
Re: How to obtain a three boot entry menu
« Reply #14 on: September 18, 2012, 11:15:35 PM »
Considering the sequence in my previous post, since the last disk recognized, out of the four (04), is the 8 GB Pendrive in which I have Knoppix 7.04, I thing that the last boot stanza for the /boot/grub/menu.lst should be:

title Knoppix 7.04
root (hd3,0)
chainloader +1

Am I correct?

Could be. When I have multiple drives, and not sure which will be seen as which, I make a number of stanzas with something in the titles to indicate the differences, then try each in turn to see which is the correct one. If I think I might later remove one of the drives, I leave all the stanzas in place, so I always have one that will work when that happens. I used to run with 7 hard drives in removable drive bays, and switch between the main drives and an additional 13 drives. (20 in all, with only the boot drive being constant most of the time) My menu.lst got pretty complicated, but I could always boot any installed OS from whichever drive position it happened to be in.

Drives got bigger, so now I only have one internal 2 TB drive, and two USB or eSATA connected external drives, of 750 GB and 1 TB capacity, which stay attached most of the time to my main machine. Each drive has a boot partition, and any one of them can be set as the boot drive and be able to boot any installation on any of the three drives. I have two other machines to which I can attach either or both of the external drives and boot to any of the multiple OS installed on them, or any of the multiple OS installed on their respective internal drives. Still a bit complicated on the boot stanzas, but much better than before.  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...