Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I check my MBR is OK?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
philip
Guru
Guru


Joined: 10 Jun 2003
Posts: 535
Location: Sweden

PostPosted: Mon Jun 04, 2012 5:44 pm    Post subject: How do I check my MBR is OK? Reply with quote

How can I check that my Master Boot Record, MBR exists and is OK?

(The disk is new and I intend to let my system boot from the new disk by changing the BIOS boot disk order)
_________________
/Phil
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Jun 04, 2012 6:25 pm    Post subject: Reply with quote

Well, the MBR is the first 512 bytes of the disk. I suppose you could make a copy of it with dd and then verify that it contains some data... but really the most useful thing in the MBR is the partition table. I'd say that if you can see a partition table with `fdisk -l` there is a good chance your MBR is sane.

Some info here you might want to peruse:
http://en.wikipedia.org/wiki/Master_boot_record
Back to top
View user's profile Send private message
philip
Guru
Guru


Joined: 10 Jun 2003
Posts: 535
Location: Sweden

PostPosted: Mon Jun 04, 2012 6:31 pm    Post subject: Reply with quote

#fdisk -l /dev/sda looks good:

# fdisk -l /dev/sda

Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5aa63057

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 83 Linux
/dev/sda2 206848 73607167 36700160 82 Linux swap / Solaris
/dev/sda3 73607168 468862127 197627480 83 Linux

I have the most strange problem of booting a new SSD that I have prepared from my previous HDD, se separate post:
_________________
/Phil
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Jun 04, 2012 8:10 pm    Post subject: Reply with quote

Nothing really seems strange about your fdisk results. I just commented on your other thread about the issue you are having with GRUB and your new SSD...
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Jun 04, 2012 9:45 pm    Post subject: Re: How do I check my MBR is OK? Reply with quote

philip wrote:
How can I check that my Master Boot Record, MBR exists and is OK?

(The disk is new and I intend to let my system boot from the new disk by changing the BIOS boot disk order)

Code:
dd if=/dev/sda bs=446 count=1|hexdump

to check if anything is written to it.

Code:
mkdir -p /mnt/sda_root/sda_boot

mount /dev/sda3 /mnt/sda_root
mount /dev/sda1 /mnt/sda_root/sda_boot

should do it

Good luck :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum