You are not logged in.

#1 2016-11-18 17:57:07

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

[SOLVED] Everything considers partition table broken except fdisk and

So, I installed and configured everything, then the system didn't boot, and I like "man, you installed grub package, but it won't configure itself!". So I ran:

$ sudo mount /dev/sdc1 /tmp/mnt
$ sudo arch-chroot /tmp/mnt    
# grub-install /dev/sdc
Installing for i386-pc platform.
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

Searching around, I was going to try a blind advice about a separate boot partition, and that's where the magic begins.

Starting gparted says The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. and shows 2 buttons: if I press "Cancel", sdc size is shown as ≈15G (the real one), and if I press "Ignore", it's of ≈60G size! And the space is "unallocated".

partitionmanager doesn't do anything weird, and just have a message No valid partition table was found on this device.

Then I remember: I tried making a hybrid GPT/MBR before installation, but gave up for GPT, and just left a single partition. Probably, GPT doesn't require a separate FAT partition, as everywhere written, and the utilties trying to read GPT.

So I tried removing GPT:

$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): x

Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): n
MBR is unchanged. You may need to delete an EFI GPT (0xEE) partition
with fdisk or another tool.

But it didn't fix; more over, the warning from gdisk keeps appearing upon re-running it!

Meanwhile, fdisk doesn't even care (neither does the system — "sdc1" shown up correctly in logs and /dev/):

$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 14.9 GiB, 16025444352 bytes, 31299696 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: 0x429817b4

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 31299695 31297648 14.9G 83 Linux

I'm so confused, what would I do…?

Last edited by Hi-Angel (2016-11-19 17:09:37)

Offline

#2 2016-11-18 19:42:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] Everything considers partition table broken except fdisk and

What is the output of fdisk /dev/sdc -l   ? when run as root


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-11-18 20:00:31

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

ewaller wrote:

What is the output of fdisk /dev/sdc -l   ? when run as root

It's in the end of the post

$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 14.9 GiB, 16025444352 bytes, 31299696 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: 0x429817b4

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 31299695 31297648 14.9G 83 Linux

Offline

#4 2016-11-18 22:06:09

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Everything considers partition table broken except fdisk and

How about

# parted -l

GUIs can be so confusing sometimes... tongue

Offline

#5 2016-11-19 01:45:33

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Everything considers partition table broken except fdisk and

So you had a disk with GPT, protective MBR and only one partition, where I assume you installed Arch. If this is the case then you forgot to read this[1] carefully.

[1] https://wiki.archlinux.org/index.php/GR … structions


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2016-11-19 06:49:22

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

Head_on_a_Stick wrote:

How about

# parted -l

GUIs can be so confusing sometimes... tongue

It behaves the same as gparted does:

$ sudo parted -l
[…snipped info for 2 other disks…]


Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? cancel
Model: Sandisk USB Ultra (scsi)
Disk /dev/sdc: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
$ sudo parted -l
[…snipped info for 2 other disks…]


Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? ignore                                                 
Error: No valid partition map found.
Model: Sandisk USB Ultra (scsi)                                       
Disk /dev/sdc: 64.1GB
Sector size (logical/physical): 2048B/512B
Partition Table: unknown
Disk Flags:
R00KIE wrote:

So you had a disk with GPT, protective MBR and only one partition, where I assume you installed Arch. If this is the case then you forgot to read this[1] carefully.

[1] https://wiki.archlinux.org/index.php/GR … structions

Not that I "forgot", I'd probably eventually came to this info, but as I mentioned, I gave up for GPT (because it took too much time, for no apparent usefulness to me), so I assumed that repartitioning the disk with `fdisk` is enough to get rid of GPT. Now it seems, it isn't.

Last edited by Hi-Angel (2016-11-19 07:07:26)

Offline

#7 2016-11-19 08:09:44

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

As a last resort I tried recreate in `parted` partition table — `mklabel msdos`, but now of course sdc1 disappeared.

Well, lessons learned, don't fiddle around with GPT. Closing.

Offline

#8 2016-11-19 08:19:54

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

Funnily enough, recreating a primary partition with fdisk returned it back! And neither gparted, nor partitionmanager, nor parted complains anymore.

Sadly though, it didn't solve the problem with grub-install, and gdisk still spits that non-sense warning about overlapping partitions even though it themselves says that GPT is invalid. Perhaps a bug in gdisk.

Offline

#9 2016-11-19 08:47:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Everything considers partition table broken except fdisk and

Don't use [Closed], it denotes a locked thread, use [Solved] instead.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2016-11-19 08:59:14

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

jasonwryan wrote:

Don't use [Closed], it denotes a locked thread, use [Solved] instead.

But it would confuse users from search, because it's not actually solved.

Anyway, I hope, I might come up with a solution. I figured out that grub has the problem, probably, because both sdc and sdc1 have the same label. But I didn't label it! It's a label from a live ISO which have been burned to the stick long before. I tried emptying it with `e2label`, to no avail. Where did the label came from anyway, GPT doesn't even exist anymore??

In summary, it's all very confusing, but probably solvable.

Offline

#11 2016-11-19 09:02:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Everything considers partition table broken except fdisk and

Well then remove it entirely, just don't leave it with [Closed] in the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2016-11-19 14:49:03

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

Well, I'm stuck. The problem is that — surprisingly — none of those /sfdisk/fdisk/sgdisk/gdisk/gparted/partitionmanager provides an advanced functional, like printing a partition table disregarding its validity, not to mention editing it. sfdisk have an option "-X" though — but it doesn't work, I even reported it on the mailing list, so far without answers.

That doesn't make any sense — how do their devs even debug problems?? Are they just dumping parts with "dd" into a file, and looking with hex-editor and small hand-made utilities? That's just horrible.

My probably last chance is to find how to make "mount" ignore GPT — so that it wouldn't put labels into /dev/disk/by-label, thus making grub-install work. But looking through "man mount", I didn't see the option, so only if I missed, or there's something undocumented about it…

Offline

#13 2016-11-19 14:52:54

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: [SOLVED] Everything considers partition table broken except fdisk and

What does wipefs say (with --no-act option)? It should be able to remove most signatures... careful not to kill your filesystem with it, though.

Offline

#14 2016-11-19 15:32:19

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

frostschutz wrote:

What does wipefs say (with --no-act option)? It should be able to remove most signatures... careful not to kill your filesystem with it, though.

$ sudo wipefs -n /dev/sdc
offset               type
----------------------------------------------------------------
0x1fe                PMBR   [partition table]

0x8001               iso9660   [filesystem]
                     LABEL: Ubuntu 15.10 amd64
                     UUID:  2015-10-21-16-17-40-00

iso9660 is a CD filesystem, a remaining from a bootable CD that was there before. I don't understand though, why in the output of fdisk:

[snip]
Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 31299695 31297648 14.9G 83 Linux

the offset is 2048 (0x800), which is faar before 0x8001, i.e. the imaginary iso9660 resides somewhere inside the real filesystem. But judging from the valid values, it wasn't overwritten, so I can wipe it out just fine. I gtg for a hour, then, if nobody has other advices, I'll try it out.

Offline

#15 2016-11-19 17:09:03

Hi-Angel
Member
Registered: 2016-07-16
Posts: 43

Re: [SOLVED] Everything considers partition table broken except fdisk and

frostschutz thank you very much! So, I wiped off the entry for unexisting GPT partition with `sudo wipefs -o 0x8001 /dev/sdc`, and grub-install started working! I can even boot from this usb-stick, this is awesome!

Offline

Board footer

Powered by FluxBB