gusl: (Default)
[personal profile] gusl
I am somewhat worried that the Ubuntu installer will either overwrite my WinXP Recovery partition (provided by HP), or put its own bootloader before one gets a chance to hit F11, preventing access to the Recovery Partition. My goal is to triple-boot: frequently boot into (1) Ubuntu and (2) WinXP, and very infrequently into (3) Recovery Partition.

Some claim that F11 is a BIOS feature, and thus safe. Others say that *not* deleting the Recovery Partition can cause boot problems.

Running cfdisk from the Live CD, I see that I have two partitions:
* sda1: NTFS, ~72.5GB
* sda2: W95 FAT32 (LBA), ~7.5GB

I think sda2 is the recovery partition; I find it a bit surprising that it's FAT.

UPDATE: This is exactly what I'm asking for, except that I have an HP, not an Acer. 'meierfra' suggests adding Ubuntu to the Windows bootloader.
Alternatively, 'pumalite' suggests installing grub to the partition, rather than to the MBR, and booting with SuperGrub. (This sounds annoying; imagine going through 2 boot screens every time you restart your machine) But none of this should be necessary if the "F11 Restore" is a BIOS feature, as some people claimed.

(no subject)

Date: 2009-02-26 05:53 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Ok, I want to copy the MBR.

Is this doable inside Windows?

(no subject)

Date: 2009-02-26 05:59 am (UTC)
From: [identity profile] dachte.livejournal.com
I don't know how to do it under windows, or if windows would even allow most code to do it. It's easier to do it from Linux running on a USB stick - a simple quick "dd".

(no subject)

Date: 2009-02-26 06:07 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
ok, hopefully it will put the copied MBR in the same directory.

(no subject)

Date: 2009-02-26 06:32 am (UTC)
From: [identity profile] dachte.livejournal.com
I should clarify. A simple, quick "dd" with the appropriate arguments. It'll put the copy of the MBR wherever you tell it to - "dd" is kind of a swiss army knife for moving raw data around. To take the MBR, you'll want to do something vaguely like:

dd if=/dev/sda of=my_mbr.img bs=512 count=1

(replacing sda with whatever your hard disk raw device is, and changing the of parameter to point to wherever you want the mbr copy)

(no subject)

Date: 2009-02-26 06:39 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Thanks. How do I find out my hard disk raw device?

(no subject)

Date: 2009-02-26 06:49 am (UTC)
From: [identity profile] dachte.livejournal.com
If ubuntu offers to mount it, let it do so, then open up a terminal and type "mount" or "df -k", and look for the devicename for wherever it mounted it. Otherwise, you can either poke through dmesg or play a little guessing game - "fdisk -l DEVICENAME" should show you your partition table when you get the devicename right. Things you should guess:

/dev/sda
/dev/sdb
...

/dev/hda
/dev/hdb
...

It's unlikely your hard disk will be anything else.

(no subject)

Date: 2009-02-26 09:14 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Thanks.

I tried fdisk -l on those 4. Results: cannot open /dev/sd*, and for /dev/hd*, it returned empty.

I can see /dev/sdb1, but that's my external HD. Since I booted from a CD, I suspect the HD never mounted...

dmesg returns a huge list of stuff.

(no subject)

Date: 2009-02-26 09:16 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
I dumped the output of 'dmesg', and it doesn't contain the word "dev", although the string "dev" appears 75 times.

(no subject)

Date: 2009-02-26 01:33 pm (UTC)
From: [identity profile] dachte.livejournal.com
Oh, the "cannot open" is because you need to be root to do any of this.

(no subject)

Date: 2009-02-26 05:39 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
ok. Now I have my_mbr.img, which is 512 bytes long. Is this correct?

I'm saving it to the external HD. Would it be easy to recover my MBR now, in case it gets damaged?

(no subject)

Date: 2009-02-28 12:59 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Done. My image is 512 bytes.

What tool can I use to double-check what an MBR image has?

Thanks!

(no subject)

Date: 2009-02-28 01:09 am (UTC)
From: [identity profile] dachte.livejournal.com
There are no real tools for checking that - you *may* be able to persuade fdisk to see it with enough gymnastics, but that's not something simple enough that I can walk you through it.

If you ever need to restore it, just do something like:
dd if=/path/to/image.img of=/dev/sda
(or whatever the devicename is). Don't do this unless you have to!

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags