[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lilo and moving IDE drives for dual booting?



Too many typos in my first posting.  I hope this makes better sense:)

Windoze are notorious for install inflexibility.  Linux can be real easy
and can be moved with minimal change (/etc/fstab /etc/lilo)

M$ OS never behaves well when it is installed on 2nd/3rd drives in my
previous experience.

I tend to put lilo in /dev/hda1 while installing debian multiboot mbr or
other mbr boot loader on /dev/hda.  This way, any stupid program such as
windows installation program can overwrite mbr and still no serious
damage.  Well this is just my taste:)

Below procedure is what I may do to make system dual boot (Other options
are possible but may require more knowledge.)
________________________________________________________________________ 
Move Debian installed HDD from /dev/hda to /dev/hdb (slave on IDE).
Install New HDD as /dev/hda (Master on IDE).  This slave / master are
selected by the jumpers on the back of HDD.  They hang from same IDE
cable in this case.

Boot with MS boot disk, stop install by F-something.  Run FDISK from
prompt to create a small partition (about 10-50MB) as MSDOS at the start
of disk.  (This ensures stupid M$ FDISK compatible partition boundary)
 
Shut-off and reboot with Debian boot CD/floppies (Rescue/root)

Type "rescue" at boot prompt.  (Or press ALT-F2 at the installation
menu), to get into the bash shall prompt on Linux.
 
At the shell run "fdisk /dev/hda".  Change type of above created partition
(/dev/hda1) to ext2. "sync".  Shut-off power.

Do normal windows install (FDISK&FORMAT) of win98 on Master HDD (C:) If
it is huge disk (>10GB), you may create another partition 10%-30% for
data (D:) so scandisk on them runs faster on data.  Just do not touch
ext2 partition.

This gets you to a working WIN98 system on /dev/hda2.  /dev/hda has WIN
installed MBR.  Shut-off power properly in windows.

Now let's start reactivating Debian. Boot with Debian boot CD/floppies
(Rescue/root) again.

---- OPTION 1 ----
Type "rescue" at boot prompt.  (Or press ALT-F2 at menu), to gain shall.
Assume your Debian root partition (One contains /etc) is now located at
/dev/hdb1: (For potato boot disk)

# cd /
# mount /dev/hdb1 /target
# cd target/etc
# ae lilo.conf
# ae fstab
# cd /
# lilo -r /target
# install-mbr /dev/hda -e 12 -i a
# umount /target

Shut-off power

This is painful since "ae" is a BAD editor.  (Also not sure you have
install-mbr command on root floppies)

----- OPTION 2 ------
Easier way is at boot prompt, enter "rescue root=/dev/hdb1".  This
boots your already configured Debian system.

If you have /usr in different partition, few programs may break but you
get more functional system than using boot floppies only.  Also you can
mount those manually.  For example "mount /dev/hda5 /usr" if /usr was on
/dev/hda5.

Then you can edit with "vim" or use "mc" as easy way.
In this case, as a root:

# cd /etc
# vim lilo.conf
... change contents to point to new location.
... Install it to /dev/hda1
# vim fstab
... Adjust it to reflect new configuration.
# lilo
# man install-mbr
# install-mbr /dev/hda -e 12 -i a
# shutdown -h now

--- Starting Debian / Windows98 ---
At boot prompt, type 1 or 2 at the prompt.
If boot from /dev/hda1 (1), Debian on /dev/hdb1 is booted.
  (With proper /etc/lilo.conf, you may boot Win98 from here too)
If boot from /dev/hda2 (2), windows98 is booted.

Some more interesting information on boot / configuration of debian is
on http://qref.sourceforge.net/quick/. 

Above waists /dev/hda1 for lilo since Debian standard MBR only boot from
/dev/hda (As I remember).  But if you install LILO as MBR at /dev/hda,
you may not need it.  But you never know when Windows overwrite it or,
some virus detection program may complain.  So I tend to install
minimalist MBR on /dev/hda while keeping LILO safe in /dev/hda1.

Alternative is to install MBR bootloader such as GAG.  It is graphical
and can boot from /dev/hdb1 directly.  Configuration is interactive.

See http://www.rastersoft.com/gageng.htm

This boot loader can boot any partition including /dev/hdb1 and comes in
nice graphics and easy self configuration ability :)  Good for personal
use.
-- 
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ 
+  Osamu Aoki <debian@aokiconsulting.com>, GnuPG-key: 1024D/D5DE453D  +
+  My debian quick-reference, http://qref.sourceforge.net/quick/      +



Reply to: