Chuck Campbell
2015-Apr-10 00:22 UTC
[CentOS] how can I tell what's on the MBR of /dev/sda?
Subject says it. I would like to find out if I have anything written on the MBR of a disk in my system /dev/sda, or any other device. If there is something there, is it readable, or recognizable to humans? thanks, -chuck
Stephen Harris
2015-Apr-10 00:28 UTC
[CentOS] how can I tell what's on the MBR of /dev/sda?
> I would like to find out if I have anything written on the MBR of a disk > in my system /dev/sda, or any other device. > If there is something there, is it readable, or recognizable to humans?sudo dd if=/dev/sda bs=512c count=1 | hexdump -C -- rgds Stephen
John R Pierce
2015-Apr-10 01:34 UTC
[CentOS] how can I tell what's on the MBR of /dev/sda?
On 4/9/2015 5:22 PM, Chuck Campbell wrote:> Subject says it. > > I would like to find out if I have anything written on the MBR of a > disk in my system /dev/sda, or any other device. > If there is something there, is it readable, or recognizable to humans?the MBR contains both binary boot code, which is not human readable, and the master partiion table for the device. you can display the latter like... $ sudo parted /dev/sda print Model: ATA Crucial_CT512M55 (scsi) Disk /dev/sda: 512GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 525MB 524MB primary ext4 boot 2 525MB 512GB 512GB primary lvm note tho, that if "Partition Table" instead says gpt, then the disk is formatted GPT and doesn't use the MBR. $ sudo parted /dev/sdb print Model: ATA ST32000644NS (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 65.5kB 2000GB 2000GB pri raid -- john r pierce, recycling bits in santa cruz
Robert Nichols
2015-Apr-10 04:17 UTC
[CentOS] how can I tell what's on the MBR of /dev/sda?
On 04/09/2015 07:22 PM, Chuck Campbell wrote:> Subject says it. > > I would like to find out if I have anything written on the MBR of a disk > in my system /dev/sda, or any other device. > If there is something there, is it readable, or recognizable to humans?Running "file -s /dev/sda" will tell you quite a bit about what's there. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
Chuck Campbell
2015-Apr-10 18:59 UTC
[CentOS] how can I tell what's on the MBR of /dev/sda?
On 4/9/2015 8:34 PM, John R Pierce wrote:> On 4/9/2015 5:22 PM, Chuck Campbell wrote: >> Subject says it. >> >> I would like to find out if I have anything written on the MBR of a >> disk in my system /dev/sda, or any other device. >> If there is something there, is it readable, or recognizable to humans? > the MBR contains both binary boot code, which is not human readable, and > the master partiion table for the device. you can display the latter like... > > $ sudo parted /dev/sda print > Model: ATA Crucial_CT512M55 (scsi) > Disk /dev/sda: 512GB > Sector size (logical/physical): 512B/4096B > Partition Table: msdos > > Number Start End Size Type File system Flags > 1 1049kB 525MB 524MB primary ext4 boot > 2 525MB 512GB 512GB primary lvm > > >Mine looks similar to the above. Partition table is msdos, I have different partitions, but the number 1 is my /boot, where grub is installed, and it shows as type ext2. However, when I try to boot it grub says Filesystem type unknown, partition type 0xee and won't load /vmlinuz Googling this says it is a GUID partition table (gpt), in spite of what parted said??? -chuck -- ACCEL Services, Inc.| Specialists in Gravity, Magnetics | (713)993-0671 ph. | and Integrated Interpretation | (713)993-0608 fax 448 W. 19th St. #325| Since 1992 | (713)306-5794 cell Houston, TX, 77008 | Chuck Campbell | campbell at accelinc.com | President & Senior Geoscientist | "Integration means more than having all the maps at the same scale!"