[Note: that I recommend either the method used by Lin'N'Win project:
http://www.icpug.org.uk/national/linnwi ... innwin.htm
or the grub4dos in mbr method instead:
http://www.murga-linux.com/puppy/viewto ... 180#135180,
but I've posted this alternative here for technical interests sake. Also see method in
http://tinycorelinux.com/forum/index.php?topic=459.0 - mcewanw]
Posted: Sun Oct 30, 2005 6:14 pm Post subject: Install SLAX to Win-XP machine w/out messing up Win-XP Reply with quote
This post tells you how I installed SLAX to my Windows-XP machine. It is done by using WinXP's own bootloader (ntldr). This method has the advantage of NEVER making your windows unbootable.
Target:
People who dont want to install linux bootloaders (like GRUB or Lilo) in their MBR, and thus are not required to configure them so that they boot Windows.
ie: linux noobs like myself Smile
Links i used:
hacks.oreilly.com/pub/h/2337
slax.org/forum/viewtopic.php?t=7230
Start
My HD before the SLAX install was like this:
partition1 - primary - NTFS (with win-xp) - 4GB
partition2 - primary - FAT32 (data partition - 36GB
I started with freeing some space for SLAX's partitions, by using partition magic (can also be done with parted/qtparted) to resize partition2 from 36GB to 33GB
Important note: I defraged partition2 before resizing it, ensuring that the free space in it would be in the end of the partition.
Next, I booted SLAX cd, and used cfdisk to make swap (512MB) and ext3 (2.5GB) partitions.
Code:
cfdisk /dev/hda
After a quick reboot, I then made the filesystems in those, and mounted hda4
Code:
mkswap /dev/hda3
mkfs.ext3 /dev/hda4
mkdir /mnt/hda4
mount /dev/hda4 /mnt/hda4
Then I installed Slax to /mnt/hda4
Code:
cp --preserve -R /{bin,dev,etc,home,lib,root,sbin,usr,var,opt} /mnt/hda4
mkdir /mnt/hda4/{boot,mnt,proc,sys,tmp}
cp /boot/boot/vmlinuz /mnt/hda4/boot
I needed to get GRUB from the internet and install it:
Code:
wget
ftp://ftp.slackware.com/pub/slackware/s ... i486-2.tgz
installpkg grub-0.97-i486-2.tgz
Next, I made a backup (just in case, hehe) of the MBR, and installed GRUB in the hd4 partition, not in the HD's MBR
Code:
dd if=/dev/hda of=/mnt/hda2/backup.mbr bs=512 count=1
grub-install --root-directory=/mnt/hda4 /dev/hda4
echo "timeout=4
title Slax
kernel /boot/vmlinuz max_loop=255 root=/dev/hda4 vga=normal rw" > /mnt/hda4/boot/grub/menu.lst
My HD after the SLAX install looks like this:
partition1 - primary - NTFS (with win-xp) - 4GB
partition2 - primary - FAT32 (data partition - 33GB
partition3 - primary - linux-swap - 512MB
partition4 - primary - linux-ext3 (with SLAX) - 2.5GB
At this time I dumped the SLAX bootloader (GRUB) to a file:
Code:
dd if=/dev/hda4 of=/mnt/hda2/slax.mbr bs=512 count=1
Note:/mnt/hda4 is where I installed GRUB, and /mnt/hda2 is where my FAT32 partition is mounted (must be RW in SLAX). If you dont have a FAT32 partition, you can use a floppy disk or usb-flash-drive to store the file.
I shutdown SLAX, took the cd out of the drive and rebooted (at this point it boots normaly into Win-XP because SLAX is not visible yet)
In win-xp, I moved the slax.mbr file from my FAT32 drive (d:\) to c:\ (where my Win-xp is installed).
Next, I edited my c:\boot.ini file and added c:\slax.mbr="SLAX" in the last line.
My boot.ini looks like this now:
Code:
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
c:\slax.mbr="SLAX"
Note: you may have to clear the hiden and read-only attributes in c:\boot.ini to be able to edit this file.
That's it. I rebooted and saw the "SLAX" option along with win-xp.
_________________
The bigger they are, the harder they fall...
thank god SLAX is so tiny!
Last edited by Dude on Tue Sep 12, 2006 11:26 pm; edited 1 time in total