General
cancel
Showing results for 
Search instead for 
Did you mean: 

making Linux HD Primary Master FROM Secondary Master

 
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

ok thanks for replies..il give comments after.
btw im using LILO. and now.. since i cant use my windows HD.. i just use my LInux. and yes all of my installed linux in the secondary master HD is all working. and my files in windows are still accessible tru linux
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

- the output of "fdisk -l /dev/hda" in Linux
root@darkstar:~# fdisk -l /dev/hda

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2449 19671561 c W95 FAT32 (LBA)
/dev/hda2 2450 4998 20474842+ f W95 Ext'd (LBA)
/dev/hda5 2450 4998 20474811 b W95 FAT32



- the output of "fdisk -l /dev/hdc" in Linux
root@darkstar:~# fdisk -l /dev/hdc

Disk /dev/hdc: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 19376 9765472+ a6 OpenBSD
/dev/hdc2 19377 38752 9765504 83 Linux
/dev/hdc3 38753 58128 9765504 83 Linux
/dev/hdc4 58129 155061 48854232 5 Extended
/dev/hdc5 58129 62003 1952968+ 83 Linux
/dev/hdc6 62004 62197 97744+ 83 Linux
/dev/hdc7 62198 64135 976720+ 82 Linux swap
/dev/hdc8 64136 66073 976720+ 83 Linux
/dev/hdc9 66074 68011 976720+ 83 Linux
/dev/hdc10 68012 77699 4882720+ 83 Linux
/dev/hdc11 77700 97075 9765472+ 83 Linux
/dev/hdc12 125998 155061 14648224+ 83 Linux
/dev/hdc13 97076 125997 14576656+ 83 Linux




- the contents of your /etc/lilo.conf file


to follow. .

- the contents of your Windows C:\BOOT.INI file

[boot loader]
timeout=30
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" /fastdetect
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

In order to boot the Windows disk simply edit the boot.ini to point to disk(1) and rdisk(1). Windows can sometimes have problems when you do this as there are many references in the registry that get broken. The best way to solve this is to boot from a Windows-CD and then load-up the rescue console and run the bootmgr repair utilities. I can't remember the names off hand but if you look for everything called boot and then run the man pages it is very simple to achieve. This will of course overwrite the Linux MBR so you will then ahve to boot Linux from CD and overwrite it again with Grub/LILO.
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

so do you mean that FROM THIS:

[boot loader]
timeout=30
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" /fastdetect


IT WILL BECOME LIKE THIS :

[boot loader]
timeout=30
default=multi(0)disk(1)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(0)disk(1)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect



************************************


then use slack CD.. mount the partition where my LILO.CONF resides.. then RE - RUN lilo /sbin/lilo -v

and it will be ok?

Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

That looks right to me. You have two ways of doing this though. If you boot your Linux distro and then:
dd if=/dev/sda of=/tmp/boot.lnx bs=512 count=1

You can then leave the Linux disk as is and then add an extra OS entry to the Windows boot loader, copy the "boot.lnx" file onto the Windows volume, and boot like that, either way will work, it just depends on whether you prefer LILO or Windows boot.

The bad news is that whenever you patch either OS it will overwrite the MBR and so be prepared to repeat this procedure in the future.
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

****************************************

1

That looks right to me. You have two ways of doing this though. If you boot your Linux distro and then:
dd if=/dev/sda of=/tmp/boot.lnx bs=512 count=1


2

You can then leave the Linux disk as is and then add an extra OS entry to the Windows boot loader, copy the "boot.lnx" file onto the Windows volume, and boot like that, either way will work, it just depends on whether you prefer LILO or Windows boot.


3

The bad news is that whenever you patch either OS it will overwrite the MBR and so be prepared to repeat this procedure in the future.

***************************************


uhm,,,, sir i am sorry but item 1 and 2 are quite blurred to me... can you explain it in a detailed manner if its ok? :)


item 3 pertains to re running LILO.. do i get it correct?
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

1 Boot your Linux distro and then:
dd if=/dev/sda of=/tmp/boot.lnx bs=512 count=1

To do this open a shell session. The command creates the (of) file "/tmp/boot.lnx" and it is 512 characters long. The input file (if) is the name of the disk device that contains the Linux boot loader that LILO starts when you boot the machine. This is like creating a boot floppy in DOS. When you copy this file to your Windows partition, you can then edit the Windows "boot.ini" as follows:

Open a DOS Window:
cd \
attrib -s -h -r boot.ini
edit boot.ini

c:\boot.lnx="Linux"

# Save the changes you made to BOOT.INI and then return to the command prompt and type:

attrib +s +h +r boot.ini

# If you wish to change the order of the selections in the boot manager screen (e.g. to make Linux appear before Windows), just change the order of the relevant lines in BOOT.INI. Likewise, if you wish Linux to be the default selection, change the text after the "default=" line to:

default=c:\boot.lnx

Close the DOS Window and reboot.

You should now be able to boot Linux from Windows.