Solved! Invalid Partition Table on New Install

Help with issues regarding installation of Debian

Solved! Invalid Partition Table on New Install

Postby MikeE » 2017-09-21 12:55

I have been trying to install Debian 9.1 on a 64GB USB pen drive on my PC. Downloaded the install image, and burned it to a 4GB pen drive. I then booted from the Debian installer and installed Debian to one partition on the 64GB USB pen drive. When asked if I wanted to update Grub on my hard drive (which has Windows and Ubuntu already installed) to add a boot to Debian option I clicked no, install Grub to the 64GB pen drive. I want to leave my hard drive as it is. The install went without problems, but when I came to boot from the newly installed Debian image, I got the message "invalid partition table". I repeated the process with the same result.

Can anyone help me get my Debian image working?
Last edited by MikeE on 2017-09-25 13:11, edited 1 time in total.
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby GarryRicketson » 2017-09-21 13:21

Well, don't you think it would help us answer if you at least showed us
what the partition table is on this ? then maybe some one can see what
is wrong with it.
If you don't know how to do that:
How to see what the partition table is on Debian
1 hit of many : https://www.cyberciti.biz/faq/linux-viewing-drive-partitions-with-fdisk-parted/

Show us the output of this command:
(# indicates you must be root or use "sudo")
Code: Select all
# fdisk -l
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4480
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-21 13:46

OK, this is what fdisk -l gives me:

Disk /dev/sdc: 57.3 GiB, 61505273856 bytes, 120127488 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: 0x19a5efee

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 86767615 86765568 41.4G 83 Linux
/dev/sdc2 86769662 120125439 33355778 15.9G 5 Extended
/dev/sdc5 86769664 120125439 33355776 15.9G 82 Linux swap / Solaris
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-21 14:08

It appears that sdc2 is overlapping sdc5. I don't even know what sdc2 is for. Can I just delete it?
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby wizard10000 » 2017-09-21 14:51

MikeE wrote:It appears that sdc2 is overlapping sdc5. I don't even know what sdc2 is for. Can I just delete it?


No. You can only have four primary partitions on an MBR-based partition table. sda2 is an extended partition that *contains* sda5.

Does your hardware support an MBR-based partition table? If it uses UEFI instead of BIOS it may not unless you enable legacy mode in your EFI setup.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1225
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-21 15:20

I'm using legacy mode boot. That should support an MBR partition table?
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby wizard10000 » 2017-09-21 16:12

MikeE wrote:I'm using legacy mode boot. That should support an MBR partition table?


I'd think so. If you still have the live disk you wrote to the 4GB drive can you boot from it and see if it can mount and read stuff on the 64GB drive?
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1225
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Invalid Partition Table on New Install

Postby TonyT » 2017-09-21 18:49

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 86767615 86765568 41.4G 83 Linux
/dev/sdc2 86769662 120125439 33355778 15.9G 5 Extended
/dev/sdc5 86769664 120125439 33355776 15.9G 82 Linux swap / Solaris

I would reinstall onto the drive and when the partitioner loads delete all existing partitions and manually create 2 new primary partitions, one for linux and one for swap. You don't need an extended partition at all if the thumb drive is used only for running linux. Or create 3 primary partitions: 15GB for / (bootable), 40GB /home & 2GB swap. (/ and /home formatted at ext4)
TonyT
 
Posts: 525
Joined: 2006-09-04 11:57

Re: Invalid Partition Table on New Install

Postby p.H » 2017-09-22 15:13

Some (too many) buggy BIOSes require that the boot device has a partition table with a primary partition which has the "boot" flag activated. So I would try to activate the boot flag on the primay partition sdc1.
Code: Select all
fdisk /dev/sdc

Code: Select all
command : a (toggle boot flag)
partition : 1
command : p (print table)
command : w (write table to disk)
command : q (quit)
p.H
 
Posts: 179
Joined: 2017-09-17 07:12

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-25 07:28

OK. I manually partitioned the drive - a swap partition of 4GB, the rest as an ext3 bootable partition. I don't get the partition table error now, but the PC won't boot - doesn't do a thing. The file system is readable. What I have done wrong this time?

Disk /dev/sdb: 57.3 GiB, 61505273856 bytes, 120127488 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: 0x19a5efee

Device Boot Start End Sectors Size Id Type
/dev/sdb1 112314368 120125439 7811072 3.7G 82 Linux swap / Solaris
/dev/sdb2 * 2048 112314367 112312320 53.6G 83 Linux

Partition table entries are not in disk order.
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby p.H » 2017-09-25 07:44

How did you install the boot loader ?
p.H
 
Posts: 179
Joined: 2017-09-17 07:12

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-25 07:48

Through the Debian installer package. The install routine gave me the option of installing on the hard drive or on the Flash drive. I chose the flash drive. I can see /boot and /boot/grub directories
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-25 07:48

Is there a way of manually installing the bootloader?
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Re: Invalid Partition Table on New Install

Postby p.H » 2017-09-25 08:34

Did you select the MBR of the flash drive and not any partition ?

Yes you can manually install the boot loader. You can do so by starting the installer in rescue mode, launch a shell on the installed system root and run
Code: Select all
grub-install /dev/sdX

with /dev/sdX being the flash drive.
p.H
 
Posts: 179
Joined: 2017-09-17 07:12

Re: Invalid Partition Table on New Install

Postby MikeE » 2017-09-25 13:06

Success! At last! I reinstalled Grub from the shell and it booted. Thanks very much all who helped me out.
MikeE
 
Posts: 8
Joined: 2017-09-21 12:44

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable