Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Multibooting DSL-XP-Vista from Windows bootmanager, Chainloading DSL from ntldr< Next Oldest | Next Newest >
jah_lah Offline





Group: Members
Posts: 17
Joined: May 2005
Posted: Aug. 22 2007,16:15 QUOTE

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. :p
Back to top
Profile PM 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Aug. 23 2007,05:38 QUOTE

Quote (jah_lah @ Aug. 22 2007,12:15)
5 - Open xterm and type in:
dd if=/dev/hdxy of=bootsect.lnx s=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.

5 - Open xterm and type in:
correction??

dd if=/dev/hdxy of=bootsect.lnx bs=512 count=1

note: actually,  I think byte size defaults to 512 if you leave it out       entirely.
Back to top
Profile PM 
jah_lah Offline





Group: Members
Posts: 17
Joined: May 2005
Posted: Aug. 23 2007,12:25 QUOTE

Quote (jpeters @ Aug. 23 2007,02:38)
Quote (jah_lah @ Aug. 22 2007,12:15)
5 - Open xterm and type in:
dd if=/dev/hdxy of=bootsect.lnx s=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.

5 - Open xterm and type in:
correction??

dd if=/dev/hdxy of=bootsect.lnx bs=512 count=1

note: actually,  I think byte size defaults to 512 if you leave it out       entirely.

jpeters,

thank you for the correction, I fixed my post. As for the syntax, well, I really don't know. I am not an expert, just try to put together in a straightforward manner the results of my research to solve my own problem.You know, the kind of stuff we do routinely and once things works fine, we simply put it apart. Next time we have to start all over. So I wrote it for myself as a memo, and decided to share it. There is nothing original or new on it, nothing worth a citation, it's all public domain knowledge.
All corrections and simplifications are most welcome.
Back to top
Profile PM 
2 replies since Aug. 22 2007,16:15 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Multibooting DSL-XP-Vista from Windows bootmanager

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code