[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: persistent partition



See below - at the beginning it gets upset about the formatting and it
never seems to recover.
I'm not good enough at partitioning to be able to explain it properly.
fdisk has no problem and cfdisk has only a little grumble but still
works ok.

If I follow through with sfdisk it prompts me to zero the first 512b of
any FAT partition (the boot record). I'm not sure of how to ressurect
the boot sector afterwards but it certainly doesn't boot whether I zero
it as instructed or just ignore the warning. 

David


Debian:/# sfdisk /dev/sda
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 1009 cylinders, 16 heads, 62 sectors/track
Old situation:
Warning: The partition table looks like it was made
  for C/H/S=*/188/22 (instead of 1009/16/62).
For this listing I'll assume that geometry.
Units = cylinders of 2117632 bytes, blocks of 1024 bytes, counting from
0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+    146-    147-    303103+  83  Linux
		end: (c,h,s) expected (146,106,20) found (37,187,22)
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps
<type>).

/dev/sda1 :;
/dev/sda1          0+   1008    1009-    500463+  83  Linux
/dev/sda2 :,,L
/dev/sda2          0       -       0          0   83  Linux
partition ends on cylinder 1023, beyond the end of the disk
/dev/sda3 :;
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4 :;
/dev/sda4          0       -       0          0    0  Empty
New situation:
Units = cylinders of 507904 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+   1008    1009-    500463+  83  Linux
/dev/sda2          0       -       0          0   83  Linux
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
Warning: partition 2 has size 0 but is not marked Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
end of partition 2 has impossible value for cylinders: 1023 (should be
in 0-1008)
I don't like this - probably you should answer No
Do you want to write this to disk? [ynq] 





On Mon, 2009-03-09 at 22:35 -0700, Jordan Share wrote:
> David Cottrill wrote:
> > I'm after a clever way to sort out my partitioning.
> > 
> > Like many of you I'm generating many operating systems with varying
> > parameters - which helpfully will be going onto varying size disks.
> > 
> > Is there a script based way of creating a second (or third) partition
> > that takes up the rest of a disk of unknown size?
> > 
> > sfdisk always complains about the debian-live partition.
> > cfdisk isn't scriptable.
> > 
> > fdisk only sort of works for scripts but is better than the others - any
> > suggestions?
> 
> What does sfdisk say when it complains?  (Just joined the list, so 
> perhaps everybody else already knows about problems with sfdisk and 
> debian-live. :)
> 
> Jordan


Reply to: