PDA

View Full Version : LILO switching default OS



satoshi
10-19-2003, 05:27 AM
I recently installed Knoppix and I need to make LILO default to WinXP(hda1) instead of Linux. I was able to do it once in Damn Small Linux, but then Win98 wouldn't boot again, plus I forgot where lilo.conf was...

Stephen
10-19-2003, 06:14 AM
I recently installed Knoppix and I need to make LILO default to WinXP(hda1) instead of Linux. I was able to do it once in Damn Small Linux, but then Win98 wouldn't boot again, plus I forgot where lilo.conf was...

You would find lilo.conf in the /etc directory along with almost every other configuration file for the system. You would be looking for the line default=Linux you would want to change that to default=hda1 if that is how it appears on the lilo screen you can see what you should call it by looking at the section in the file that starts like this:


other=/dev/hda1
label=hda1
# restricted
# alias=3


You would be using what it says in the label= for the default you would then have to run /sbin/lilo -v after having changed the file for the changes to take effect, all this done as root.

satoshi
10-19-2003, 02:56 PM
OK, it lists windows as "WinNT(hda1)" and "WinNT(hdb1)" I know which one to choose, but what about the quotes? Do I use those too? Linux doesn't have quotes around it.

EDIT: ack, I can't become root, sudo isn't working.. I tried sudo su, sudo, sudo -u root (program)... It says that knoppix (the user name) isn't on the sudoers file

EDIT (again): Actually, now that I think about it, could I just boot up the knoppix CD or DSL CD, log in as root, and then edit that file? It'd be the same, right? Or I could just log in as root when it asks me my username and password... I'll report back later if it worked or not, i'm not on that computer right now though.

satoshi
10-19-2003, 06:12 PM
Ah!! XP doesn't boot! It does the whole Windows XP Home thing with the green loading bar, but then it displays a blue screen with white text. I dunno what it says because it goes by too quickly... Help..? :cry:

And if I switch Linux back to LILO's default OS, XP still won't boot properly! I tried booting XP in safemode and using last known good config... But nothing...

fingers99
10-19-2003, 07:52 PM
post your /etc/lilo.conf

and

/etc/fstab

You should be able to do:

su

[root password]

gvim /etc/lilo.conf

or su

[root password]

/sbin/lilo -v

satoshi
10-19-2003, 09:56 PM
Will this help at all with getting XP to run? That's my main concern (sp?) here. If I'm not able to do that, I'm in deep poo... I can't boot into the HD install of Knoppix though, I did a FIXMBR to try and get XP to load, it got rid of LILO, but didn't help XP...

but here's my fstab:


# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hdb6 / ext2 defaults,errors=remount-ro 0 1
/dev/hdb5 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdrom1 /cdrom1 iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/dvd /dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro 0 0
# Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 ntfs noauto,users,exec,ro 0 0


and here's my lilo.conf:


vga=791
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81

#disk=/dev/sda
# bios=0x80

# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hdb6

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
prompt
timeout=50
# prompt
# single-key
# delay=100
# timeout=100

# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce"

# Boot up Linux by default.
#
default=WinNT(hda1)

image=/boot/vmlinuz-2.4.22-xfs
label=Linux

read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
other=/dev/hda1
label="WinNT(hda1)"

other=/dev/hdb1
label="WinNT(hdb1)"

A. Jorge Garcia
10-29-2003, 07:43 PM
OK, I need to change the boot order on some of my PCs, this is very helpful. Thanx!

Is it possible, in addition, to password protect the linux boot option in this case? I would like to use knoppix-installer to hdd install as knoppix, but there's no login screen or security this way. So if there were a password on these PCs to boot linux from, say, hda5 (WIN XP on hda2 would be the default) that would also be very helpful.

I have a server knoppix-installed as debian with a login screen (using kdm?) with all my users' accounts. For some reason, this server does not print correctly to my printers. However, the knoppix installed PCs do. So I'd have my clients use knoppix installed PCs so they can do all their work (write java and c++ programs for computer science class) and print and then they can save work via ftp to the debian installed server.

TIA,

A. Jorge Garcia
10-31-2003, 12:58 AM
OK, I figured all this lilo.conf stuff out. And setup my labd as follows
http://www.knoppix.net/forum/viewtopic.php?t=380&start=15

If anyone has trouble with lilo.conf, let me know, I'll post what I did.

Regards,