jah_lah
Group: Members
Posts: 17
Joined: May 2005 |
|
Posted: Aug. 22 2007,16:15 |
|
Hi, I am a newbie (always!) and have been fiddling with DSL for a while. So i thought i could share some solutions that usually need a lot of research from my friends newbies...)
I have a dual-boot XP-Vista (Vista on 1st partition, XP on 2nd) and wished to hd-install DSL on another partition, keeping Windows bootloader and including DSL on boot menu.
BEWARE - Hd partitioning is always data-risky, so do your homework and BACK-UP BEFORE start fiddling around.
Here is what i did and how:
1 - Partitioning Using G-Parted livecd or another partitioner, create two new partitions, one for DSL (ext2/3, 500MB) and one little FAT-32 for file exchanging between Linux and Windows, if your Windows use NTFS. These can be either primary or extended.
2 - Boot DSL from livecd and choose HD install. Mine is SATA, so I had to choose one kernell version which support it, i think DSL 2.1b dropped the SCSI support in favour of SATA.
3 - After installing you are prompted to choose the bootloader. I choose grub. DSL bootloader installer is somewhat troublesome and do not always ask whether you wish a MBR or partition install. If it does, choose partition install. You can obviously choose MBR and let grub take care of your Windows installation, but after messing around alot with f*ck*ng VISTA boatloader I dont need another one to play with.
4 - Mount the linux partition you've just installed DSL and check the /boot/grub directory for stage1 and stage2 files. If these files are not there, grub was not installed correctly and we need to install it manually. Otherwise take next step.
5 - Open xterm and type in: dd if=/dev/hdxy of=bootsect.lnx bs=512 count=1 A rough translate could be: copy first sector from y partition of x hd (where grub lies) to a file (arbitrarily) named bootsect.lnx.
6 - Using a file manager check dir /home for the file bootsect.lnx. Mount the FAT32 partition read/write (sudo mount /dev/hdxy mnt/hdxy) Copy this file into it.
7 - Reboot to Windows XP and look for the FAT32 partition. Copy bootsect.lnx to the partition where XP is (usually C:\, but don't trust on Windows for it, check with cfdisk or g-parted) With Notepad open boot.ini(it's read-only,change the flag). Or left-click and edit. Add after last line: C:\bootsect.lnx="DSL" save file and restore original attributes. Restart computer
8 - If you are lucky Windows will open up a boot menu that includes DSL option. If you wish edit boot.ini to change default option and waiting time. This is true for XP. If you have vista in dual boot and are double-lucky, Vista boot loader parses XP boot.ini at boot time and automatically adds the new item to its menu too. That's more simple than adding up a new entry directly on Vista bootmanager. You're done!
Problems:
- If you did not find files stage1 and stage2 on /boot/grub on step 4 you need to do a manual grub install. From DSL livecd chose another previous linux tentative install on hd using grub, or copy from floppy disk files stage1 and stage2 to /boot/grub on DSL hd install. These files will be repaired by grub manual install and the only purpose of this step is to show grub where to look for your DSL installation. Then do a grub recovery - Still on livecd session, open xterm as root and type in: grub From grub shell type: find /boot/grub/stage1. The screen will show all partitions where grub find that directory structure. Watch out: grub counts hd's and partitions from 0, so e.g. what is hda for linux is hd(0,0) for grub, which in this case means the first partition of the first hd. Still on grub shell type root (hdx,y) where x, y are the hd and partition of our DSL installation. Next type setup (hdx,y) to install grub on the first sector of y partition of x disk. BEWARE: if you mistype only setup (hdx) then grub will be installed on MBR of disc x, no regrets. Now grub is installed on DSL partition and you can perform from step 5 on.
- If Vista do not detected the changes on boot.ini, maybe XP is on the second partition of hd and was installed after Vista. In this case, one common practice to deal with the Vista-XP boot issues is to copy the files ntldr and boot.ini to the Vista partition, the first in my case. You should edit the boot.ini file that resides in the Vista partition in this case, otherwise Vista bootloader will be unaware of the modifications.
I did not try lilo, but with some adaptations the same process is valid. I even use Vista bootloader successfully to boot a MAC OSX386 partition at the end of the hd.
By the way, this is called chainload.
|