Re: [CentOS] Analyzing the MBR

2014-06-06 Thread Cliff Pratt
I believe that the whole of the first track on a disk used to be "reserved" or rather used to contain the MBR only (and anything else needed by the boot loader) and the first filesystem on disk used to start at track 1. Of course, with the larger disks this got more complicated. Cheers, Cliff O

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Robert Nichols
On 06/05/2014 03:31 PM, John R Pierce wrote: > traditional PC partitioning tools, dating back to MSDOS, put partitions > on 'cylinder' boundaries. this is a bad idea on modern disks, whether > they be SSD's that often have 128K physical write blocks, or newer HD's > with 4096 byte physical sector

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Les Mikesell
On Thu, Jun 5, 2014 at 6:24 PM, Timothy Murphy wrote: > Les Mikesell wrote: > >> Ummm, yeah That's why I let gparted do the math. > > But even gparted leaves some maths to be done, > eg since it uses MiB's it seems logical to use GiB's > which means difficult calculations like 80x1024 = ? > N

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Timothy Murphy
Les Mikesell wrote: > Ummm, yeah That's why I let gparted do the math. But even gparted leaves some maths to be done, eg since it uses MiB's it seems logical to use GiB's which means difficult calculations like 80x1024 = ? -- Timothy Murphy e-mail: gayleard /at/ eircom.net School of Mathe

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Timothy Murphy
John R Pierce wrote: > the rest of the space between the sector 0 MBR and the first primary > partition is completely empty, nothing puts anything there. You say that with supreme self-confidence, but I have just looked at 3 disks with eg [tim@helen tmp]$ sudo dd if=/dev/sdb of=sdb.mbr bs=2048

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Les Mikesell
On Thu, Jun 5, 2014 at 5:06 PM, John R Pierce wrote: > On 6/5/2014 2:50 PM, Les Mikesell wrote: >> New bigger disks may use 4k physical sectors but report 512 for >> backwards compatibility. If you don't write 4 contiguous sectors it >> has to read, wait for the disk to spin back around, then wri

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread John R Pierce
On 6/5/2014 2:50 PM, Les Mikesell wrote: > New bigger disks may use 4k physical sectors but report 512 for > backwards compatibility. If you don't write 4 contiguous sectors it > has to read, wait for the disk to spin back around, then write, > merging in what you did write. Which means writes wi

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread m . roth
John R Pierce wrote: > On 6/5/2014 1:56 PM, m.r...@5-cent.us wrote: >> mkpart pri 0.0GB x.GB >> *always* gives me aligned partions (and parted - talk about user hostile programs! "Not aligned", with not a clue as to what it actually wants) > > I've taken to always running parted with -a none,

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Les Mikesell
On Thu, Jun 5, 2014 at 4:00 PM, John R Pierce wrote: > On 6/5/2014 1:56 PM, m.r...@5-cent.us wrote: >> mkpart pri 0.0GB x.GB >> *always* gives me aligned partions (and parted - talk about user hostile >> programs! "Not aligned", with not a clue as to what it actually wants) > > I've taken to

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread John R Pierce
On 6/5/2014 1:56 PM, m.r...@5-cent.us wrote: > mkpart pri 0.0GB x.GB > *always* gives me aligned partions (and parted - talk about user hostile > programs! "Not aligned", with not a clue as to what it actually wants) I've taken to always running parted with -a none, as its alignment rules ar

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread m . roth
John R Pierce wrote: > On 6/5/2014 12:07 PM, Timothy Murphy wrote: >> That doesn't really answer my question; >> I know (roughly) what the MBR, ie the first 512 bytes, contains. >> But I notice that my laptop, for example, leaves 64 sectors >> for something at the start of the disk; >> and when I

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread m . roth
Timothy Murphy wrote: > John R Pierce wrote: > >> On 6/5/2014 10:47 AM, Timothy Murphy wrote: >>> Is this strictly true - that only the MBR is read at boot-time? >> >> the MBR has two elements. >> >> A) the boot code, which is read and executed by the BIOS at boot time, >> only on the boot drive >>

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread John R Pierce
On 6/5/2014 1:31 PM, John R Pierce wrote: > parted -a min /dev/sdb oops, that was supposed to say, parted -a /none / -- john r pierce 37N 122W somewhere on the middle of the left coast ___ CentOS mailing lis

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread John R Pierce
On 6/5/2014 12:07 PM, Timothy Murphy wrote: >> >A) the boot code, which is read and executed by the BIOS at boot time, >> >only on the boot drive >> >and >> >B) the master partition table, which is read on any drive when its >> >inserted > That doesn't really answer my question; > I know (roughly)

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Timothy Murphy
John R Pierce wrote: > On 6/5/2014 10:47 AM, Timothy Murphy wrote: >> Is this strictly true - that only the MBR is read at boot-time? > > the MBR has two elements. > > A) the boot code, which is read and executed by the BIOS at boot time, > only on the boot drive > and > B) the master partition

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread John R Pierce
On 6/5/2014 10:47 AM, Timothy Murphy wrote: > Is this strictly true - that only the MBR is read at boot-time? the MBR has two elements. A) the boot code, which is read and executed by the BIOS at boot time, only on the boot drive and B) the master partition table, which is read on any drive when

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread Timothy Murphy
David Both wrote: > The dd command shows you **exactly** what is in the MBR and, if you want, > the following sectors. But the following sectors are not particularly > relevant to boot. THe MBR contains the boot record and the partition > table. There is not room for anything else. But your probl

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread mark
On 06/05/14 07:01, Timothy Murphy wrote: > Is there any tool for analysing the MBR on a computer? > I know one can just dd it and see roughly what it contains. > But surely one should be able to work out the exact content > of the MBR and the neighbouring sectors read at boot time? > > I had a diff

Re: [CentOS] Analyzing the MBR

2014-06-05 Thread David Both
The dd command shows you **exactly** what is in the MBR and, if you want, the following sectors. But the following sectors are not particularly relevant to boot. THe MBR contains the boot record and the partition table. There is not room for anything else. But your problem is not with the MBR s

[CentOS] Analyzing the MBR

2014-06-05 Thread Timothy Murphy
Is there any tool for analysing the MBR on a computer? I know one can just dd it and see roughly what it contains. But surely one should be able to work out the exact content of the MBR and the neighbouring sectors read at boot time? I had a difficult day, probably due to my ignorance, which would