Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Adding 2000/XP partition(s) to LILO

  • 01-11-2003 4:51pm
    #1
    Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭


    I have 3 OSs running on one 80GB HD: Windows 2000 Server, XP Pro and Mandrake 9.2.

    The partitions were created with Partition Magic 8, here's the partition info:
    [root@blackbox /]# fdisk -l /dev/hda
                                                                                    
    Disk /dev/hda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
                                                                                    
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1   *         1      6904  55456348+   7  HPFS/NTFS
    /dev/hda2          6905      9729  22691812+   f  Win95 Ext'd (LBA)
    /dev/hda5          6905      8816  15358108+   7  HPFS/NTFS
    /dev/hda6          8817      9337   4184901   83  Linux
    /dev/hda7          9338      9400    506016   82  Linux swap
    /dev/hda8          9401      9729   2642661   83  Linux
    
    (hda1 = Win2K, hda5 = XP)


    Installed Win2K, then XP, then Mandrake; they're all working fine.

    However, when LILO starts up at boot time, and I select "windows", I then get my multiboot options for Win2K and XP. This is fine, but I'd like to choose between Win2K or XP *in* LILO.

    Here is the /etc/lilo.conf file:
    boot=/dev/hda
    map=/boot/map
    default="windows"
    keytable=/boot/uk.klt
    prompt
    nowarn
    timeout=100
    message=/boot/message
    menu-scheme=wb:bw:wb:bw
    image=/boot/vmlinuz
            label="linux"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=mount hdc=ide-scsi acpi=off splash=silent"
            vga=788
            read-only
    image=/boot/vmlinuz
            label="linux-nonfb"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=mount hdc=ide-scsi acpi=off"
            read-only
    image=/boot/vmlinuz-secure
            label="linux-secure"
            root=/dev/hda6
            initrd=/boot/initrd-secure.img
            append="devfs=mount hdc=ide-scsi acpi=off splash=silent"
            read-only
    image=/boot/vmlinuz
            label="failsafe"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=nomount hdc=ide-scsi acpi=off failsafe"
            read-only
    other=/dev/hda1
            label="windows"
            table=/dev/hda
    
    # I added the following 3 lines:
    other=/dev/hda5
            label="WindowsXP"
    #     table=/dev/hda
    

    With the last "table=..." line uncommented I get this:
    [root@blackbox etc]# lilo
    Added linux
    Added linux-nonfb
    Added linux-secure
    Added failsafe
    Added windows *
    Fatal: Partition entry not found.
    [root@blackbox etc]#
    

    With it commented, It's the same as selecting "windows"; it just goes to the multiboot manager, to choose between Win2K and XP.

    How can I add Win2K and XP to LILO? :confused:


Comments

  • Registered Users, Registered Users 2 Posts: 2,077 ✭✭✭parasite


    well hda1 isn't isn't 2k, it's the mbr (overridden by lilo), anyway try :
    other=/dev/hda2
            label="windows2k"
    
    other=/dev/hda5
            label="WindowsXP"
    

    total guess, probably wrong :confused:


  • Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭Magic Monkey


    No joy, it just came up with the white "loading windows" on black in the top-left of the screen and froze.


  • Registered Users, Registered Users 2 Posts: 2,077 ✭✭✭parasite


    you have to type 'su -c lilo' after you've updated lilo.conf

    i just had a look at mine & the following should do, have a lash off this :
    boot=/dev/hda
    map=/boot/map
    default="windows"
    keytable=/boot/uk.klt
    prompt
    nowarn
    timeout=100
    message=/boot/message
    menu-scheme=wb:bw:wb:bw
    image=/boot/vmlinuz
            label="linux"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=mount hdc=ide-scsi acpi=off splash=silent"
            vga=788
            read-only
    image=/boot/vmlinuz
            label="linux-nonfb"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=mount hdc=ide-scsi acpi=off"
            read-only
    image=/boot/vmlinuz-secure
            label="linux-secure"
            root=/dev/hda6
            initrd=/boot/initrd-secure.img
            append="devfs=mount hdc=ide-scsi acpi=off splash=silent"
            read-only
    image=/boot/vmlinuz
            label="failsafe"
            root=/dev/hda6
            initrd=/boot/initrd.img
            append="devfs=nomount hdc=ide-scsi acpi=off failsafe"
            read-only
    other=/dev/hda2
            label="windows2k"
            table=/dev/hda
    other=/dev/hda5
            label="WindowsXP"
            table=/dev/hda
    


  • Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭Magic Monkey


    Originally posted by parasite
    you have to type 'su -c lilo' after you've updated lilo.conf

    Seeing as I have to be su anyway to edit lilo.conf, won't just typing "lilo" do the same thing? As "su -c lilo" just gives me:
    bash: line 1: lilo: command not found
    i just had a look at mine & the following should do, have a lash off this :

    <snip>

    No joy, same "Fatal: Partition entry not found." error; I appreciate your help though, thanks.


  • Registered Users, Registered Users 2 Posts: 2,077 ✭✭✭parasite


    if it's not in your path, type (as root) '/sbin/lilo' (or wherever it is), you'll then get a confirmation you've actually updated it, like :
    [root@localhost etc]# /sbin/lilo
    Added linux
    Added windows *
    Added floppy
    [root@localhost etc]#
    


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,582 Mod ✭✭✭✭Capt'n Midnight


    At a guess you can't choose which OS starts - because NTLDR needs to look at the BOOT.INI file to see which one to load
    (Please tell me I am wrong :) )

    Ok In Theory then

    If you had set up 2K on a primary partition and then Setup a second PRIMARY partition and made it ACTIVE and then installed XP on the second partition then all you'd need to do is get LILO to boot off it.

    But since your second partiton /dev/hda5 is an EXTENDED it's a bit messy..

    Maybe you could copy Boot.ini , ntldr ntdetect.com to the second NTFS partition and change the default line in Boot.ini to point to XP.
    Then when LILO starts /dev/hda1 ntldr starts 2K
    and when /dev/hda5 starts the ntldr starts XP


  • Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭Magic Monkey


    parasite: yup, same output as running "lilo"

    Capt'n Midnight: Once I choose "windows" in LILO, it goes to a white-on-black screen with the choice between Win2K and XP (is this NTLDR?), with a set interval timeout.

    When you say:
    Maybe you could copy Boot.ini , ntldr ntdetect.com to the second NTFS partition...

    You mean copy the C:\boot.ini, C:\WINNT\ServicePackFiles\i386\ntldr, ntdetect.com over to their respective directories on the XP partition? (E:\) - as aside from boot.ini, the other two files already exist on E:\

    Also:
    ...and change the default line in Boot.ini to point to XP.
    Then when LILO starts /dev/hda1 ntldr starts 2K
    and when /dev/hda5 starts the ntldr starts XP

    Here's my C:\boot.ini file
    [boot loader]
    timeout=15
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Server" /fastdetect
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
    

    If I copied the files over to the XP partition, would I then have to remove the XP entry in the C:\boot.ini file? (thus setting the default to Win2K, and thus setting the default to XP in the E:\boot.ini file)?


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,582 Mod ✭✭✭✭Capt'n Midnight


    First thing - you dont change anything on the C: Drive

    The whole idea is to make D: bootable
    In 2k or Xp format a floppy disk, then copy the files mentioned above to it (ntldr and ntdetect are hidden in c:\ )

    and boot off the floppy you can then modify the default line of the boot.ini on the floppy to boot into XP

    Then copy the three files to the D: drive

    Probably won't work but worth a try - at least you have a boot disk for XP :)

    (note if you are using scsi you need to copy another file - can never rememebr it's name - but will be a sys file in the root )


  • Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭Magic Monkey


    That's all well and good, but alas...


    ...I have no 3.5" floppy drive, nor disks; stopped using them years ago. D'oh. Perhaps if I created a second primary partition and made it active as you said Capt'n Midnight, it may work, but it's not worth the hassle! - thanks for your help guys :)


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    I've recently switched from lilo to grub, and although I don't have as complicated a setup as yours, I think it may be able to do what you're looking for. The "lilo.conf" equivalent is called menu.lst, and the install is very easy - I use Debian, so I found these links:

    http://www.linuxorbit.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=539&page=1

    http://myrddin.org/howto/debian-grub.html

    No doubt, there's similar info somewhere for grub on Mandrake. Might be worth a try anyway - the reason I went with it was because I couldn't get my dual boot going with lilo, and grub sorted it out at the first attempt. I'm putting it on all my boxes now. Obvious advice - make yourself a lilo boot disk, just in case anything goes wrong.....


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 491 ✭✭Silent Bob


    Have you read the boot.ini's that are used by win2k/XP

    I imagine that when you installed 2k and XP they set up boot options for each other. When you use LILO to select a windows partition it runs the windows boot manager, if you have the windows boot managers set up to only have the option of loading their OS's and remove the timeout clause you should be fine.

    so the 2k boot.ini should only mention the 2k stuff and the xp boot.ini should only mention the xp stuff.

    (Note: the above is conjecture, it's been a while since I tinkered with a windows box)


  • Registered Users, Registered Users 2 Posts: 1,068 ✭✭✭Magic Monkey


    tomk: Tried Grub, not to my taste. I'll stick with LILO until I get a better grasp on Linux :)

    Silent Bob: Yup, tried that, no luck.

    Thanks for the help lads, I'm going to leave the setup as it is, 'cause if it ain't broke...


Advertisement