Re: gdisk-created Bios Boot Partition created with NO fs, reports fs TYPE=ext4. Bug/why?

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

 




On Mon, Feb 16, 2015, at 10:38 AM, Darrick J. Wong wrote:
> Wiping the partition table doesn't erase filesystem superblocks, so if there
> previously was an sdc1 with an ext4 partition and the new sdc1 starts at the
> same offset, the old fs is still accessible.
...
> wipefs.

Starting with what I had most recently ...

stopping the arrays

	mdadm --stop /dev/md0
	mdadm --stop /dev/md1

zero'ing out the superblocks

	mdadm --zero-superblock /dev/sdc3
	mdadm --zero-superblock /dev/sdd3
	mdadm --zero-superblock /dev/sdc4
	mdadm --zero-superblock /dev/sdd4

wiping the drive details

	wipefs --all --force /dev/sdc1
	wipefs --all --force /dev/sdc2
	wipefs --all --force /dev/sdc3
	wipefs --all --force /dev/sdc4
	wipefs --all --force /dev/sdc
	wipefs --all --force /dev/sdd1
	wipefs --all --force /dev/sdd2
	wipefs --all --force /dev/sdd3
	wipefs --all --force /dev/sdd4
	wipefs --all --force /dev/sdd

creating new partition info

	sgdisk -z /dev/sdc
	sgdisk -o /dev/sdc
	sgdisk -n 1:2048:+1M    -t 1:ef02  -c 1:"BIOS Boot"           /dev/sdc
	sgdisk -n 2:+0M:+300M   -t 2:ef00  -c 2:"EFI System"          /dev/sdc
	sgdisk -p /dev/sdc
		...
		Number  Start (sector)    End (sector)  Size       Code  Name
		   1            2048            4095   1024.0 KiB  EF02  BIOS Boot
		   2            4096          618495   300.0 MiB   EF00  EFI System

replicating to the other drive

	sgdisk -R=/dev/sdd /dev/sdc

& randomizing its GUID

	sgdisk -G /dev/sdd

checking now

	blkid /dev/sdc1
		/dev/sdc1: PARTLABEL="BIOS Boot" PARTUUID="c374b718-3f28-49e8-9d35-452844288233" 
	blkid /dev/sdd1
		/dev/sdd1: PARTLABEL="BIOS Boot" PARTUUID="547ad9ec-3e9c-44a4-ac05-e3f244280675" 

perfect.

thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux