[AktiviX] Hard disks
Nick Hill
nick at nickhill.co.uk
Tue Oct 28 13:09:54 UTC 2003
Please note: moving hard drives around and changing partition numbers
will create a world of hurt for those not prepared to learn how the boot
process works and learn some pretty complicated concepts. If you want to
use your GNU/Linux machine as a desktop system and don't want to get
involved with Unix-like commands, don't attempt to do this. I will
therefore assume access to the root account, knowledge that root is
needed to do these things and preparedness to learn Unix commands.
I agree with Martin. I recommend:
Pri Master (hda) Windows 8Gb
Pri Slave (hdb) CD Rom drive
Sec Master (hdc) GNU/Linux and doze data
Sec Slave (hdd) CD Writer.
If you swap drive order and want to continue to dual boot, you will need
to edit a couple of files on your GNU/Linux distribution so that
1) Your bootloader will work properly
2) When your system boots, it can find your root partition.
3) Your bootloader will give an option to boot into doze
You need to know what partition the Linux distro is on
You need to know what partition doze is on.
I will assume you use LILO as your boot loader. This can provide a menu
to select which operating system you want to boot into. LILO can manage
booting into doze, GNU/Linux and other operating systems.
--Boot loading using lilo and lilo.conf--
LILO is managed from lilo.conf. lilo.conf describes to the program lilo
(which does not run automatically) what bootloader it must write, and
where it must write it.
Lilo must write the bootloader to the bootable disk. This is normally
the first hard drive on the primary channel, as this normally has the
highest boot priority.
I have shown hda, hdb, hdc and hdd above in their respective positions.
hdd is always the slave on the second IDE channel, irrespective of what
other drives are connected.
If your machine boots from the primary master hard drive, then put:
boot=/dev/hda
If your GNU/Linux system is on the first hard drive of the second
channel (hdc) and the partition is number 2 (hdc2):
root=/dev/hdc2
If the the Linux kernel is called /vmlinuz and boot image is /boot.img
(as is common on Debian systems - debian systems use boot.img. Many
others don't.)
image=/vmlinuz
label=Linux
read-only
initrd=/initrd.img
If you are dual booting doze and doze is on the first partition of the
first hard drive (as is most comon- hda1) then you need a lilo.conf entry:
other=/dev/hda1
label=DOS
table=/dev/hda
After you have edited lilo.conf, you need to run lilo. lilo.conf does
not do anything other than telling lilo the specifications of a
bootloader to install. If you edit lilo.conf and you want the changes to
take effect, always run lilo.
Running lilo from a system which has not already booted up can be
tricky. You get a chicken and egg situation. This is where the command
chroot is useful. If you can boot the machine with GNU/Linux, and you
can mount the hard drive of the system you want to be bootable, you can
chroot into the hard drive then run lilo.
For example, boot from a floppy distribution of GNU/Linux. A good single
floppy distro can be found here:
http://www.toms.net/rb/
I recommend the floppy over Knoppix CDs as I have had trouble having the
/dev/ devices recognised and useable in a chrooted environment when
booting with some knoppix variants. Some tag in the kernel has possibly
been set so that devices are not available on non-root mounted
filesystems (or perhaps the system does not give access to devices where
a filesystem is mounted with the user option).
Once booted from floppy, assuming your GNU/Linux system is on hdc2 and
your lilo.conf is correct, do:
cd /mnt
mkdir hdc2
mount /dev/hdc2 hdc2
chroot hdc2 /sbin/lilo
umount hdc2
Reboot.. and Bingo!
Doug Paulley wrote:
> Following on from the Hardware workshop. If a PC has an 8Gb drive with one bootable Windows partition on it, one 40Gb with one 20Gb Windows data and a bootable Linux distro in rest, one 16x CD-ROM and one fast CD burner and DVD reader, what configuration would be best in terms of primary master etc?
More information about the AktiviX-discuss
mailing list