* label-id and sfdisk problem
@ 2017-02-21 16:31 Bartłomiej Solarz-Niesłuchowski
2017-02-21 16:49 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: Bartłomiej Solarz-Niesłuchowski @ 2017-02-21 16:31 UTC (permalink / raw)
To: util-linux; +Cc: kzak, Lukasz Trabinski
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
Dear List,
I have problem with setting label-id of dos partition table
The problem occurs when i use sfdisk:
1. I "save" the partition table with sfdisk -d /dev/sda > saved.table
(saved file has label-id of partition table)
2. then i restore this via sfdisk /dev/sda < saved.table
BUT
label-id of dos partition table can be changed in this operation e.g.:
when i run command such:
sfdisk -d /dev/sda > saved.table
sfdisk /dev/sda < saved.table
sfdisk -d /dev/sda
sfdisk /dev/sda < saved.table
sfdisk -d /dev/sda
sfdisk /dev/sda < saved.table
sfdisk -d /dev/sda
each time when i restore partition table label-id of dos type partition
table is changed!
For me it is essential that label-id is set exactly as previous because
after that i restore windows operationg system on this partitions and
windows take care about label-id of boot disk partition table
Currently i use fdisk (expert option i) for setting label-id of
partition, but why it is not possible thru sfdisk?
Best Regards
--
Bartłomiej Solarz-Niesłuchowski, Administrator WSISiZ
e-mail: Bartlomiej.Solarz-Niesluchowski@wit.edu.pl
tel. 223486547, fax 223486501
JID: solarz@jabber.wit.edu.pl
01-447 Warszawa, ul. Newelska 6, pokój 404, pon.-pt. 8-16
Motto - Jak sobie pościelisz tak sie wyśpisz
[-- Attachment #2: Kryptograficzna sygnatura S/MIME --]
[-- Type: application/pkcs7-signature, Size: 3940 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: label-id and sfdisk problem
2017-02-21 16:31 label-id and sfdisk problem Bartłomiej Solarz-Niesłuchowski
@ 2017-02-21 16:49 ` Karel Zak
2017-02-21 16:58 ` Bartłomiej Solarz-Niesłuchowski
0 siblings, 1 reply; 4+ messages in thread
From: Karel Zak @ 2017-02-21 16:49 UTC (permalink / raw)
To: Bartłomiej Solarz-Niesłuchowski; +Cc: util-linux, Lukasz Trabinski
On Tue, Feb 21, 2017 at 05:31:25PM +0100, Bartłomiej Solarz-Niesłuchowski wrote:
> Dear List,
>
> I have problem with setting label-id of dos partition table
> The problem occurs when i use sfdisk:
> 1. I "save" the partition table with sfdisk -d /dev/sda > saved.table (saved
> file has label-id of partition table)
> 2. then i restore this via sfdisk /dev/sda < saved.table
> BUT
> label-id of dos partition table can be changed in this operation e.g.:
> when i run command such:
> sfdisk -d /dev/sda > saved.table
> sfdisk /dev/sda < saved.table
> sfdisk -d /dev/sda
> sfdisk /dev/sda < saved.table
> sfdisk -d /dev/sda
> sfdisk /dev/sda < saved.table
> sfdisk -d /dev/sda
>
> each time when i restore partition table label-id of dos type partition
> table is changed!
>
> For me it is essential that label-id is set exactly as previous because
> after that i restore windows operationg system on this partitions and
> windows take care about label-id of boot disk partition table
>
> Currently i use fdisk (expert option i) for setting label-id of partition,
> but why it is not possible thru sfdisk?
Version? I'm not able to reproduce this problem (v2.28.2 as well as
upstream tree with incoming v2.30).
Karel
# modprobe scsi_debug dev_size_mb=100;
# echo ',,L' | sfdisk /dev/sdc
Disk /dev/sdc: 100 MiB, 104857600 bytes, 204800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
>>> Created a new DOS disklabel with disk identifier 0x6061f502.
Created a new partition 1 of type 'Linux' and of size 99 MiB.
/dev/sdc2:
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 204799 202752 99M 83 Linux
# sfdisk -d /dev/sdc > saved
# cat saved
label: dos
label-id: 0x6061f502
device: /dev/sdc
unit: sectors
/dev/sdc1 : start= 2048, size= 202752, type=83
# sfdisk /dev/sdc < saved
Disk /dev/sdc: 100 MiB, 104857600 bytes, 204800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
Disklabel type: dos
Disk identifier: 0x6061f502
Old situation:
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 204799 202752 99M 83 Linux
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x6061f502.
Created a new partition 1 of type 'Linux' and of size 99 MiB.
/dev/sdc2:
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 204799 202752 99M 83 Linux
# sfdisk -d /dev/sdc
label: dos
label-id: 0x6061f502
device: /dev/sdc
unit: sectors
/dev/sdc1 : start= 2048, size= 202752, type=83
>
> Best Regards
>
> --
> Bartłomiej Solarz-Niesłuchowski, Administrator WSISiZ
> e-mail: Bartlomiej.Solarz-Niesluchowski@wit.edu.pl
> tel. 223486547, fax 223486501
> JID: solarz@jabber.wit.edu.pl
> 01-447 Warszawa, ul. Newelska 6, pokój 404, pon.-pt. 8-16
> Motto - Jak sobie pościelisz tak sie wyśpisz
>
>
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: label-id and sfdisk problem
2017-02-21 16:49 ` Karel Zak
@ 2017-02-21 16:58 ` Bartłomiej Solarz-Niesłuchowski
2017-02-21 17:54 ` Bartłomiej Solarz-Niesłuchowski
0 siblings, 1 reply; 4+ messages in thread
From: Bartłomiej Solarz-Niesłuchowski @ 2017-02-21 16:58 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux, Lukasz Trabinski
[-- Attachment #1: Type: text/plain, Size: 5767 bytes --]
W dniu 2017-02-21 o 17:49, Karel Zak pisze:
> On Tue, Feb 21, 2017 at 05:31:25PM +0100, Bartłomiej Solarz-Niesłuchowski wrote:
>> Dear List,
>>
>> I have problem with setting label-id of dos partition table
>> The problem occurs when i use sfdisk:
>> 1. I "save" the partition table with sfdisk -d /dev/sda > saved.table (saved
>> file has label-id of partition table)
>> 2. then i restore this via sfdisk /dev/sda < saved.table
>> BUT
>> label-id of dos partition table can be changed in this operation e.g.:
>> when i run command such:
>> sfdisk -d /dev/sda > saved.table
>> sfdisk /dev/sda < saved.table
>> sfdisk -d /dev/sda
>> sfdisk /dev/sda < saved.table
>> sfdisk -d /dev/sda
>> sfdisk /dev/sda < saved.table
>> sfdisk -d /dev/sda
>>
>> each time when i restore partition table label-id of dos type partition
>> table is changed!
>>
>> For me it is essential that label-id is set exactly as previous because
>> after that i restore windows operationg system on this partitions and
>> windows take care about label-id of boot disk partition table
>>
>> Currently i use fdisk (expert option i) for setting label-id of partition,
>> but why it is not possible thru sfdisk?
> Version? I'm not able to reproduce this problem (v2.28.2 as well as
> upstream tree with incoming v2.30).
root@sysresccd /mnt % sfdisk /dev/sdb < henwar.2017.sdb.sfdisk
Checking that no-one is using this disk right now ... OK
Disk /dev/sdb: 489.1 GiB, 525112713216 bytes, 1025610768 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
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x1f257e1a.
Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 500 MiB.
/dev/sdb2: Created a new partition 2 of type 'HPFS/NTFS/exFAT' and of
size 488.6 GiB.
/dev/sdb3:
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M c W95 FAT32 (LBA)
/dev/sdb2 1026048 1025607679 1024581632 488.6G 7 HPFS/NTFS/exFAT
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@sysresccd /mnt % sfdisk -d /dev/sdb
label: dos
label-id: 0x1f257e1a
device: /dev/sdb
unit: sectors
/dev/sdb1 : start= 2048, size= 1024000, type=c, bootable
/dev/sdb2 : start= 1026048, size= 1024581632, type=7
root@sysresccd /mnt % less henwar.2017.sdb.sfdisk
label: dos
label-id: 0x908b462c
device: /dev/sdb
unit: sectors
/dev/sdb1 : start= 2048, size= 1024000, type=c, bootable
/dev/sdb2 : start= 1026048, size= 1024581632, type=7
root@sysresccd /mnt % sfdisk -v
sfdisk from util-linux 2.28.2
As you see sfdisk creates different label-id than it has in file
>
> Karel
>
>
> # modprobe scsi_debug dev_size_mb=100;
> # echo ',,L' | sfdisk /dev/sdc
>
> Disk /dev/sdc: 100 MiB, 104857600 bytes, 204800 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 524288 bytes
>
> >>> Created a new DOS disklabel with disk identifier 0x6061f502.
> Created a new partition 1 of type 'Linux' and of size 99 MiB.
> /dev/sdc2:
> New situation:
>
> Device Boot Start End Sectors Size Id Type
> /dev/sdc1 2048 204799 202752 99M 83 Linux
>
> # sfdisk -d /dev/sdc > saved
> # cat saved
>
> label: dos
> label-id: 0x6061f502
> device: /dev/sdc
> unit: sectors
>
> /dev/sdc1 : start= 2048, size= 202752, type=83
>
>
> # sfdisk /dev/sdc < saved
>
> Disk /dev/sdc: 100 MiB, 104857600 bytes, 204800 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 524288 bytes
> Disklabel type: dos
> Disk identifier: 0x6061f502
>
> Old situation:
>
> Device Boot Start End Sectors Size Id Type
> /dev/sdc1 2048 204799 202752 99M 83 Linux
>
> >>> Script header accepted.
> >>> Script header accepted.
> >>> Script header accepted.
> >>> Script header accepted.
> >>> Created a new DOS disklabel with disk identifier 0x6061f502.
> Created a new partition 1 of type 'Linux' and of size 99 MiB.
> /dev/sdc2:
> New situation:
>
> Device Boot Start End Sectors Size Id Type
> /dev/sdc1 2048 204799 202752 99M 83 Linux
>
> # sfdisk -d /dev/sdc
>
> label: dos
> label-id: 0x6061f502
> device: /dev/sdc
> unit: sectors
>
> /dev/sdc1 : start= 2048, size= 202752, type=83
>
>
>> Best Regards
>>
>> --
>> Bartłomiej Solarz-Niesłuchowski, Administrator WSISiZ
>> e-mail: Bartlomiej.Solarz-Niesluchowski@wit.edu.pl
>> tel. 223486547, fax 223486501
>> JID: solarz@jabber.wit.edu.pl
>> 01-447 Warszawa, ul. Newelska 6, pokój 404, pon.-pt. 8-16
>> Motto - Jak sobie pościelisz tak sie wyśpisz
>>
>>
>
>
--
Bartłomiej Solarz-Niesłuchowski, Administrator WSISiZ
e-mail: Bartlomiej.Solarz-Niesluchowski@wit.edu.pl
tel. 223486547, fax 223486501
JID: solarz@jabber.wit.edu.pl
01-447 Warszawa, ul. Newelska 6, pokój 404, pon.-pt. 8-16
Motto - Jak sobie pościelisz tak sie wyśpisz
[-- Attachment #2: Kryptograficzna sygnatura S/MIME --]
[-- Type: application/pkcs7-signature, Size: 3940 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: label-id and sfdisk problem
2017-02-21 16:58 ` Bartłomiej Solarz-Niesłuchowski
@ 2017-02-21 17:54 ` Bartłomiej Solarz-Niesłuchowski
0 siblings, 0 replies; 4+ messages in thread
From: Bartłomiej Solarz-Niesłuchowski @ 2017-02-21 17:54 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux, Lukasz Trabinski
[-- Attachment #1: Type: text/plain, Size: 21093 bytes --]
W dniu 2017-02-21 o 17:58, Bartłomiej Solarz-Niesłuchowski pisze:
DEBUG:
root@sysresccd /mnt % export SFDISK_DEBUG=all
root@sysresccd /mnt % sfdisk /dev/sdb < henwar.2017.sdb.sfdisk
Checking that no-one is using this disk right now ... OK
Disk /dev/sdb: 489.1 GiB, 525112713216 bytes, 1025610768 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
Disklabel type: dos
Disk identifier: 0x5669b38d
Old situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M c W95 FAT32 (LBA)
/dev/sdb2 1026048 1025607679 1024581632 488.6G 7 HPFS/NTFS/exFAT
15530: sfdisk: PARSE: <---next-line--->
>>> Script header accepted.
15530: sfdisk: PARSE: <---next-line--->
>>> Script header accepted.
15530: sfdisk: PARSE: <---next-line--->
>>> Script header accepted.
15530: sfdisk: PARSE: <---next-line--->
>>> Script header accepted.
15530: sfdisk: PARSE: <---next-line--->
>>> Created a new DOS disklabel with disk identifier 0xd1b2a761.
Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 500 MiB.
15530: sfdisk: PARSE: <---next-line--->
/dev/sdb2: Created a new partition 2 of type 'HPFS/NTFS/exFAT' and of
size 488.6 GiB.
15530: sfdisk: PARSE: <---next-line--->
/dev/sdb3:
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M c W95 FAT32 (LBA)
/dev/sdb2 1026048 1025607679 1024581632 488.6G 7 HPFS/NTFS/exFAT
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
15530: sfdisk: MISC: bye! [rc=0]
DEBUG2:
15774: libfdisk: INIT: library debug mask: 0xffff
Available "LIBFDISK_DEBUG=<name>[,...]|<mask>" debug masks:
all [0xffff] : info about all subsystems
ask [0x0010] : fdisk dialogs
help [0x0001] : this help
cxt [0x0004] : library context (handler)
label [0x0008] : disk label utils
part [0x0040] : partition utils
parttype [0x0080] : partition type utils
script [0x0200] : sfdisk-like scripts
tab [0x0100] : table utils
15774: libfdisk: CXT: [0x8e2f338]: alloc
15774: libfdisk: CXT: [0x8e2f338]: assigning device /dev/sdb
15774: libfdisk: CXT: [0x8e2f338]: *** resetting context
15774: libfdisk: CXT: [0x8e2f338]: /dev/sdb: discovering topology...
15774: libfdisk: CXT: [0x8e2f338]: initialize libblkid prober
15774: libfdisk: CXT: [0x8e2f338]: result: log/phy sector size: 512/512
15774: libfdisk: CXT: [0x8e2f338]: result: fdisk/optimal/minimal
io: 512/0/512
15774: libfdisk: CXT: [0x8e2f338]: /dev/sdb: discovering geometry...
15774: libfdisk: CXT: [0x8e2f338]: total sectors: 1025610768
(ioctl=1025610768)
15774: libfdisk: CXT: [0x8e2f338]: result: C/H/S: 63841/255/63
15774: libfdisk: CXT: [0x8e2f338]: initialize in-memory first
sector buffer [sector_size=512]
15774: libfdisk: CXT: [0x8e2f338]: reading: offset=0, size=512
15774: libfdisk: CXT: [0x8e2f338]: probing for gpt
15774: libfdisk: LABEL: GPT probe failed
15774: libfdisk: CXT: [0x8e2f338]: probing for dos
15774: libfdisk: LABEL: DOS: initialize, first sector buffer 0x8e31cd8
15774: libfdisk: LABEL: DOS PT geometry: heads=0, sectors=0
15774: libfdisk: CXT: [0x8e2f338]: --> switching context to dos!
15774: libfdisk: CXT: [0x8e2f338]: appling user device properties
15774: libfdisk: CXT: [0x8e2f338]: reseting alignment...
15774: libfdisk: CXT: [0x8e2f338]: alignment reseted to: first
LBA=2048, last LBA=1025610767, grain=1048576 [rc=0]
15774: libfdisk: CXT: [0x8e2f338]: new C/H/S: 63841/255/63
15774: libfdisk: CXT: [0x8e2f338]: new log/phy sector size: 512/512
15774: libfdisk: CXT: [0x8e2f338]: initialized for /dev/sdb
[READ-WRITE]
15774: libfdisk: SCRIPT: [0x8e31ee0]: alloc
15774: libfdisk: TAB: [0x8e2f0d8]: alloc
15774: libfdisk: CXT: [0x8e2f338]: setting reference to script
0x8e31ee0
15774: libfdisk: ASK: [0x8e31f78]: alloc
15774: libfdisk: ASK: [0x8e31f78]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31f78]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31f78]: reset
15774: libfdisk: ASK: [0x8e31f78]: free
15774: libfdisk: ASK: [0x8e31f10]: alloc
15774: libfdisk: ASK: [0x8e31f10]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31f10]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31f10]: reset
15774: libfdisk: ASK: [0x8e31f10]: free
15774: libfdisk: ASK: [0x8e31fa8]: alloc
15774: libfdisk: ASK: [0x8e31fa8]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31fa8]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31fa8]: reset
15774: libfdisk: ASK: [0x8e31fa8]: free
15774: libfdisk: ASK: [0x8e31fb8]: alloc
15774: libfdisk: ASK: [0x8e31fb8]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31fb8]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31fb8]: reset
15774: libfdisk: ASK: [0x8e31fb8]: free
15774: libfdisk: ASK: [0x8e31f10]: alloc
15774: libfdisk: ASK: [0x8e31f10]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31f10]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31f10]: reset
15774: libfdisk: ASK: [0x8e31f10]: free
15774: libfdisk: CXT: [0x8e2f338]: asking for disk dos ID
15774: libfdisk: CXT: [0x8e2f338]: asking for disk dos item 0
15774: libfdisk: ASK: [0x8e31f10]: alloc
15774: libfdisk: ASK: [0x8e31f10]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31f10]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31f10]: reset
15774: libfdisk: ASK: [0x8e31f10]: free
15774: libfdisk: ASK: [0x8e31f10]: alloc
15774: libfdisk: ASK: [0x8e31f10]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e31f10]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e31f10]: reset
15774: libfdisk: ASK: [0x8e31f10]: free
15774: libfdisk: CXT: [0x8e2f338]: -- get table --
15774: libfdisk: TAB: [0x8e2f150]: alloc
15774: libfdisk: PART: [0x8e31f98]: alloc
15774: libfdisk: TAB: [0x8e2f150]: add entry 0x8e31f98 [start=2048,
end=1026047, size=1024000, primary]
15774: libfdisk: PART: [0x8e32038]: alloc
15774: libfdisk: TAB: [0x8e2f150]: add entry 0x8e32038
[start=1026048, end=1025607679, size=1024581632, primary]
15774: libfdisk: ASK: [0x8e327b8]: alloc
15774: libfdisk: ASK: [0x8e327b8]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e327b8]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e327b8]: reset
15774: libfdisk: ASK: [0x8e327b8]: free
15774: libfdisk: TAB: [0x8e2f150]: wrong older check
15774: libfdisk: TAB: [0x8e2f150]: reset
15774: libfdisk: TAB: [0x8e2f150]: remove entry 0x8e31f98
15774: libfdisk: PART: [0x8e31f98]: reset
15774: libfdisk: PART: [0x8e31f98]: free
15774: libfdisk: TAB: [0x8e2f150]: remove entry 0x8e32038
15774: libfdisk: PART: [0x8e32038]: reset
15774: libfdisk: PART: [0x8e32038]: free
15774: libfdisk: TAB: [0x8e2f150]: free
15774: libfdisk: SCRIPT: [0x8e31ee0]: setting new header label='dos'
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 0
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse header 'label: dos'
15774: libfdisk: SCRIPT: [0x8e31ee0]: update 'label' header 'dos' -> 'dos'
15774: libfdisk: ASK: [0x8e32380]: alloc
15774: libfdisk: ASK: [0x8e32380]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32380]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32380]: reset
15774: libfdisk: ASK: [0x8e32380]: free
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 1
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse header 'label-id:
0x908b462c'
15774: libfdisk: SCRIPT: [0x8e31ee0]: setting new header
label-id='0x908b462c'
15774: libfdisk: ASK: [0x8e32470]: alloc
15774: libfdisk: ASK: [0x8e32470]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32470]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32470]: reset
15774: libfdisk: ASK: [0x8e32470]: free
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 2
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse header 'device: /dev/sdb'
15774: libfdisk: SCRIPT: [0x8e31ee0]: setting new header device='/dev/sdb'
15774: libfdisk: ASK: [0x8e32308]: alloc
15774: libfdisk: ASK: [0x8e32308]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32308]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32308]: reset
15774: libfdisk: ASK: [0x8e32308]: free
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 3
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse header 'unit: sectors'
15774: libfdisk: SCRIPT: [0x8e31ee0]: setting new header unit='sectors'
15774: libfdisk: ASK: [0x8e32398]: alloc
15774: libfdisk: ASK: [0x8e32398]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32398]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32398]: reset
15774: libfdisk: ASK: [0x8e32398]: free
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 4
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse script line: '/dev/sdb1
: start= 2048, size= 1024000, type=c, bootable'
15774: libfdisk: PART: [0x8e31f98]: alloc
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' start= 2048,
size= 1024000, type=c, bootable'
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' size= 1024000,
type=c, bootable'
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' type=c, bootable'
15774: libfdisk: SCRIPT: [0x8e31ee0]: label 'dos'
15774: libfdisk: LABEL: [0x8e2f438]: parsing 'c' (dos) partition type
15774: libfdisk: PARTTYPE: [0xf774985c]: returns parsed 'W95 FAT32
(LBA)' [] partition type
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' bootable'
15774: libfdisk: TAB: [0x8e2f0d8]: add entry 0x8e31f98 [start=2048,
end=1026047, size=1024000, primary]
15774: libfdisk: SCRIPT: [0x8e31ee0]: applying script headers
15774: libfdisk: CXT: [0x8e2f338]: setting reference to script
0x8e31ee0
15774: libfdisk: CXT: [0x8e2f338]: --> switching context to dos!
15774: libfdisk: CXT: [0x8e2f338]: *** reseting device properties
15774: libfdisk: CXT: [0x8e2f338]: /dev/sdb: discovering topology...
15774: libfdisk: CXT: [0x8e2f338]: initialize libblkid prober
15774: libfdisk: CXT: [0x8e2f338]: result: log/phy sector size: 512/512
15774: libfdisk: CXT: [0x8e2f338]: result: fdisk/optimal/minimal
io: 512/0/512
15774: libfdisk: CXT: [0x8e2f338]: /dev/sdb: discovering geometry...
15774: libfdisk: CXT: [0x8e2f338]: total sectors: 1025610768
(ioctl=1025610768)
15774: libfdisk: CXT: [0x8e2f338]: result: C/H/S: 63841/255/63
15774: libfdisk: CXT: [0x8e2f338]: zeroize in-memory first sector
buffer
15774: libfdisk: CXT: [0x8e2f338]: reading: offset=0, size=512
15774: libfdisk: CXT: [0x8e2f338]: appling user device properties
15774: libfdisk: CXT: [0x8e2f338]: reseting alignment...
15774: libfdisk: CXT: [0x8e2f338]: alignment reseted to: first
LBA=2048, last LBA=1025610767, grain=1048576 [rc=0]
15774: libfdisk: CXT: [0x8e2f338]: new C/H/S: 63841/255/63
15774: libfdisk: CXT: [0x8e2f338]: new log/phy sector size: 512/512
15774: libfdisk: CXT: [0x8e2f338]: create a new dos label
15774: libfdisk: LABEL: DOS: creating new disklabel
15774: libfdisk: CXT: [0x8e2f338]: zeroize in-memory first sector
buffer
15774: libfdisk: CXT: [0x8e2f338]: first sector protection enabled
-- re-reading
15774: libfdisk: CXT: [0x8e2f338]: reading: offset=0, size=440
15774: libfdisk: LABEL: DOS: initialize, first sector buffer 0x8e31cd8
15774: libfdisk: ASK: [0x8e32398]: alloc
15774: libfdisk: ASK: [0x8e32398]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32398]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32398]: reset
15774: libfdisk: ASK: [0x8e32398]: free
15774: libfdisk: CXT: [0x8e2f338]: adding new partition 0x8e31f98
(start=2048, end=1026047, size=1024000, defaults(start=no, end=no,
partno=no)
15774: libfdisk: LABEL: DOS: new partition wanted
15774: libfdisk: PART: [0x8e31f98]: next partno (specified=0)
15774: libfdisk: LABEL: DOS: adding partition 0
15774: libfdisk: LABEL: DOS: last possible sector for #0 is 1025610767
15774: libfdisk: CXT: [0x8e2f338]: LBA 2048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 1025610767 -aligned-down->
1025609728 [grain=2048s]
15774: libfdisk: CXT: [0x8e2f338]: LBA 2048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 2048
range:<2048..1025609728>, result: 2048
15774: libfdisk: LABEL: DOS: start: wanted=2048, low=2048,
limit=1025610767
15774: libfdisk: LABEL: DOS: start is 2048
15774: libfdisk: LABEL: DOS: last possible sector for #0 is 1025610767
15774: libfdisk: LABEL: DOS: unused sector for #0 is 1025610767
15774: libfdisk: LABEL: DOS: raw stop: 1026047
15774: libfdisk: LABEL: DOS: setting partition 0, offset=0,
start=2048, size=1024000, sysid=0c
15774: libfdisk: LABEL: DOS: setting 0 partition to changed
15774: libfdisk: ASK: [0x8e32470]: alloc
15774: libfdisk: ASK: [0x8e32470]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32470]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32470]: reset
15774: libfdisk: ASK: [0x8e32470]: free
15774: libfdisk: CXT: [0x8e2f338]: add partition done (rc=0)
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 6
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing buffer
15774: libfdisk: SCRIPT: [0x8e31ee0]: parse script line: '/dev/sdb2
: start= 1026048, size= 1024581632, type=7'
15774: libfdisk: PART: [0x8e32038]: alloc
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' start= 1026048,
size= 1024581632, type=7'
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' size= 1024581632, type=7'
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing ' type=7'
15774: libfdisk: LABEL: [0x8e2f438]: parsing '7' (dos) partition type
15774: libfdisk: PARTTYPE: [0xf77497f8]: returns parsed
'HPFS/NTFS/exFAT' [] partition type
15774: libfdisk: TAB: [0x8e2f0d8]: add entry 0x8e32038
[start=1026048, end=1025607679, size=1024581632, primary]
15774: libfdisk: CXT: [0x8e2f338]: adding new partition 0x8e32038
(start=1026048, end=1025607679, size=1024581632, defaults(start=no,
end=no, partno=no)
15774: libfdisk: LABEL: DOS: new partition wanted
15774: libfdisk: PART: [0x8e32038]: next partno (specified=1)
15774: libfdisk: LABEL: DOS: adding partition 1
15774: libfdisk: LABEL: DOS: last possible sector for #1 is 1025610767
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 1025610767 -aligned-down->
1025609728 [grain=2048s]
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048
range:<1026048..1025609728>, result: 1026048
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 1025610767 -aligned-down->
1025609728 [grain=2048s]
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048 -unchanged-
15774: libfdisk: CXT: [0x8e2f338]: LBA 1026048
range:<1026048..1025609728>, result: 1026048
15774: libfdisk: LABEL: DOS: start: wanted=1026048, low=1026048,
limit=1025610767
15774: libfdisk: LABEL: DOS: start is 1026048
15774: libfdisk: LABEL: DOS: last possible sector for #1 is 1025610767
15774: libfdisk: LABEL: DOS: unused sector for #1 is 1025610767
15774: libfdisk: LABEL: DOS: raw stop: 1025607679
15774: libfdisk: LABEL: DOS: setting partition 1, offset=0,
start=1026048, size=1024581632, sysid=07
15774: libfdisk: LABEL: DOS: setting 1 partition to changed
15774: libfdisk: ASK: [0x8e32470]: alloc
15774: libfdisk: ASK: [0x8e32470]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32470]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32470]: reset
15774: libfdisk: ASK: [0x8e32470]: free
15774: libfdisk: CXT: [0x8e2f338]: add partition done (rc=0)
15774: sfdisk: PARSE: <---next-line--->
15774: libfdisk: SCRIPT: [0x8e31ee0]: parsing line 7
15774: libfdisk: ASK: [0x8e32470]: alloc
15774: libfdisk: ASK: [0x8e32470]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32470]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32470]: reset
15774: libfdisk: ASK: [0x8e32470]: free
15774: libfdisk: CXT: [0x8e2f338]: -- get table --
15774: libfdisk: TAB: [0x8e32358]: alloc
15774: libfdisk: PART: [0x8e32560]: alloc
15774: libfdisk: TAB: [0x8e32358]: add entry 0x8e32560 [start=2048,
end=1026047, size=1024000, primary]
15774: libfdisk: PART: [0x8e32698]: alloc
15774: libfdisk: TAB: [0x8e32358]: add entry 0x8e32698
[start=1026048, end=1025607679, size=1024581632, primary]
15774: libfdisk: ASK: [0x8e32398]: alloc
15774: libfdisk: ASK: [0x8e32398]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32398]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32398]: reset
15774: libfdisk: ASK: [0x8e32398]: free
15774: libfdisk: TAB: [0x8e32358]: wrong older check
15774: libfdisk: TAB: [0x8e32358]: reset
15774: libfdisk: TAB: [0x8e32358]: remove entry 0x8e32560
15774: libfdisk: PART: [0x8e32560]: reset
15774: libfdisk: PART: [0x8e32560]: free
15774: libfdisk: TAB: [0x8e32358]: remove entry 0x8e32698
15774: libfdisk: PART: [0x8e32698]: reset
15774: libfdisk: PART: [0x8e32698]: free
15774: libfdisk: TAB: [0x8e32358]: free
15774: libfdisk: LABEL: DOS: write PT requested [label-changed: 1,
non-pt-changed: 1]
15774: libfdisk: LABEL: DOS: MBR changed, writting
15774: libfdisk: LABEL: DOS: writting to sector 0
15774: libfdisk: ASK: [0x8e32308]: alloc
15774: libfdisk: ASK: [0x8e32308]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32308]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32308]: reset
15774: libfdisk: ASK: [0x8e32308]: free
15774: libfdisk: ASK: [0x8e32398]: alloc
15774: libfdisk: ASK: [0x8e32398]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32398]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32398]: reset
15774: libfdisk: ASK: [0x8e32398]: free
15774: libfdisk: ASK: [0x8e32308]: alloc
15774: libfdisk: ASK: [0x8e32308]: do_ask for 'info'
15774: libfdisk: ASK: [0x8e32308]: do_ask done [rc=0]
15774: libfdisk: ASK: [0x8e32308]: reset
15774: libfdisk: ASK: [0x8e32308]: free
15774: sfdisk: MISC: bye! [rc=0]
Checking that no-one is using this disk right now ... OK
Disk /dev/sdb: 489.1 GiB, 525112713216 bytes, 1025610768 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
Disklabel type: dos
Disk identifier: 0x18e5ab42
Old situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M c W95 FAT32 (LBA)
/dev/sdb2 1026048 1025607679 1024581632 488.6G 7 HPFS/NTFS/exFAT
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0xb8fbfff6.
Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 500 MiB.
/dev/sdb2: Created a new partition 2 of type 'HPFS/NTFS/exFAT' and of
size 488.6 GiB.
/dev/sdb3:
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M c W95 FAT32 (LBA)
/dev/sdb2 1026048 1025607679 1024581632 488.6G 7 HPFS/NTFS/exFAT
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
--
Bartłomiej Solarz-Niesłuchowski, Administrator WSISiZ
e-mail: Bartlomiej.Solarz-Niesluchowski@wit.edu.pl
tel. 223486547, fax 223486501
JID: solarz@jabber.wit.edu.pl
01-447 Warszawa, ul. Newelska 6, pokój 404, pon.-pt. 8-16
Motto - Jak sobie pościelisz tak sie wyśpisz
[-- Attachment #2: Kryptograficzna sygnatura S/MIME --]
[-- Type: application/pkcs7-signature, Size: 3940 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-21 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 16:31 label-id and sfdisk problem Bartłomiej Solarz-Niesłuchowski
2017-02-21 16:49 ` Karel Zak
2017-02-21 16:58 ` Bartłomiej Solarz-Niesłuchowski
2017-02-21 17:54 ` Bartłomiej Solarz-Niesłuchowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.