LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   boot problem,windows reinstall? (https://www.linuxquestions.org/questions/linux-newbie-8/boot-problem-windows-reinstall-403358/)

spx2 01-14-2006 01:50 PM

boot problem,windows reinstall?
 
i have windows xp,windows 2000,linux mandrake.
first on mbr it has lilo
i have
linux mandrake option
windows option
if i go to windows it gives me windows boot menu
between w2k and wxp.
now i want to reinstall w2k.
wouldnt this erase lilo ?
i think so.
what workarounds or solutions to this problem are there ?
i will provide any information necessary.
thank you

saman007uk 01-14-2006 02:16 PM

Backup the MBR using "dd", install Win 2000 and then restore the MBR. Then add the corresponding settings for booting Wind 2000 to your favourite boot manager.

MBR can be backed up using:
Code:

dd if=/dev/hda of=backup.file count=1 bs=448
And resored using:
Code:

dd of=/dev/hda if=backup.file bs=448 count=1
You should use a live CD to restore the backup.

spx2 01-14-2006 02:49 PM

it seems i dont have any windows 2000 at hand...
i would like to try to reinstall over the old windows 2000
a new windows xp
would the configuration i have to do change in this casE ?

saman007uk 01-14-2006 03:13 PM

Quote:

Originally Posted by spx2
it seems i dont have any windows 2000 at hand...
i would like to try to reinstall over the old windows 2000
a new windows xp
would the configuration i have to do change in this casE ?

No, it's the same.

syg00 01-14-2006 03:46 PM

Quote:

Originally Posted by saman007uk
Backup the MBR using "dd", install Win 2000 and then restore the MBR.

Certainly one option, however you'd best use 446 as the blocksize - 448 will get the first 2 bytes of the partition table as well. Bounds errors eventually cause unforseen errors ...:rolleyes:

Or you could just re-install the loader from the (Linux) install CD in recovery mode.

spx2 01-15-2006 12:13 AM

how would i reinstall boot loader in recovery mode ? exactly...
i have mandrake 10.0 official 3 cds
ubuntu 5.1 one cd
and damnsmalllinux live cd..
could anyone give some steps for this ?

spx2 01-15-2006 12:20 AM

syg00 if partition looks like this

|------------------------------|--------------------------------
i imagine that the || zone is taken by 448 parameter
now if i do 446 its like this
|----------------------------|----------------------------------
so the difference from the first is that it doesnt take in account byte 447 and 448 otherwise its the
same.
wouldnt you agree with this ?
so its not about the FIRST 2 bytes

syg00 01-15-2006 03:05 AM

Quote:

Originally Posted by spx2
how would i reinstall boot loader in recovery mode ? exactly...

Depends on the distro - have a look in the fora/wiki for the distro of choice.
Will be better than we can describe from the "outside".
Quote:

Originally Posted by spx2
so the difference from the first is that it doesnt take in account byte 447 and 448 otherwise its the
same.
wouldnt you agree with this ?
so its not about the FIRST 2 bytes

Read what I said - we were discussing the MBR, not a partition.
The MBR has an exact structure - 446 bytes for loader code, 64 bytes for partition table, 2 bytes for signature bytes.
Bytes 447 and 448 are the first two bytes of the partition table - and are potentialy very important to the health of a system.

spx2 01-15-2006 09:50 AM

i would like to use a disk to store this info on
would there be any distro to fit on one disk ?
it would suffice to have commands like ls,cp,mv,dd and maybe some ed or nano or maybe
vi for editing
and kernel and all that stuff plugged in there
what distro on a single diskette ?
ok ok...ill use a live cd altough the question above remains open

thank you very much for the explanation on mbr
i understood something new about it now...
i was planning on reading about it but i didnt felt
much like it so i left that ... for another time

saman007uk 01-15-2006 10:53 AM

Quote:

Originally Posted by spx2
i would like to use a disk to store this info on
would there be any distro to fit on one disk ?
it would suffice to have commands like ls,cp,mv,dd and maybe some ed or nano or maybe
vi for editing
and kernel and all that stuff plugged in there
what distro on a single diskette ?
ok ok...ill use a live cd altough the question above remains open

thank you very much for the explanation on mbr
i understood something new about it now...
i was planning on reading about it but i didnt felt
much like it so i left that ... for another time

You could store the backup file in a floppy or write it to a cd. It can be stored using:
Code:

dd of=/dev/hda if=backup.file bs=446 count=1
If you are just installing windows on an existing partition and are not going to change the location of the Linux OS, that all you need to do to restore the boot manager.

Dtsazza 01-15-2006 01:37 PM

Quote:

Originally Posted by spx2
i would like to use a disk to store this info on
would there be any distro to fit on one disk ?

Well, that really depends on the size of your disk, though methinks it might be a bit personal to ask a man that... ;)

If you mean floppy disks, it's hard to get a full distribution on there, naturally, but there are some fully-featured rescue-style disks out there. Tom's Root Boot is "The most GNU/Linux on one floppy disk" and it certainly has a lot of features - including ls, cp, mv, dd and much more. It eschews pico/nano though, since it includes vi as its default editorand presumably including two would be wasteful (it's worth learning vi to at least a "being able to use it" standard anyway). I've heard of a few others too, but Tom's does seem to be the most fully featured, and the one that comes up most often.

If you were thinking of business-card sized CDs, there are a few distros that will fit on one of these (with a 50Mb limit, IIRC). Again, it seems to be generally accepted that Damn Small Linux (DSL) is one of, if not the, best. Though you mention you already have one of their live CDs, so you can judge for yourself, and Google is always there if you fancy checking out other options!

saikee 01-15-2006 03:10 PM

I think the whole matter can be simplified by using Lilo itself.

Log in Mandrake as root, click terminal, pop in a floppy and type
Code:

lilo -b /dev/fd0
After Lilo has been nuked by Win2k and you can access Mandrake at all time using the floppy. When you want Lilo back to the MBR, just boot up the floppy and type
Code:

lilo -b /dev/hda
(1) Lilo's way allows you access to Mandrake all the time via the bootable floppy.

(2) No need to worry about the 446 or 448 bytes problem. I have to say though it should be 446 because we then have 4x16 byes for the partition table plus 2 spare bytes at the end making up the 512 bytes of the MBR. syg00's point is to avoid hitting the partition table as the consequence can be serious.

Mandrake can be made bootable at any time via any Live CD and so I wouldn't worry if the floppy is lost.

spx2 01-15-2006 03:43 PM

i had a very rapid change of mind
i want just got a .iso of vector linux and plan on
putting that on the space ill get after formatting
the area where w2k supposed to be.
now how would i do this ?
just saved my partition table on a cd with dd

saman007uk 01-15-2006 03:46 PM

Vector Linux should detect the Mandrake install.

saikee 01-15-2006 03:54 PM

You don't need to save the partition table just write down how many of them and the sizes because you can always rebuild it from scratch. I have rebuilt a couple of 60-partition partitions about dozen times without any loss of data.

Vector only needs about 5Gb for a install and it uses Lilo too.


All times are GMT -5. The time now is 02:54 AM.