Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Add partition to a USB flash drive Debian Installer

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Scarecrow2000
Posts: 36
Joined: 2015-04-16 02:55

Add partition to a USB flash drive Debian Installer

#1 Post by Scarecrow2000 »

I created a bootable Debian installer on my USB flash drive. The Debian Installation Guide advises;

The hybrid image on the stick does not occupy all the storage space, so it may
be worth considering using the free space to hold firmware files or packages or
any other files of your choice. This could be useful if you have only one stick
or just want to keep everything you need on one device.
Create a second, FAT partition on the stick, mount the partition and copy or
unpack the firmware onto i
t.


I want to put non free firmware packages on the stick but when I try to create a FAT partition in the free space using Disk Utility I get the following error;

Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sdb, start=661837824, size=7507093504, type=
Entering MS-DOS parser (offset=0, size=8168931328)
MSDOS_MAGIC found
looking at part 0 (offset 0, size 657457152, type 0x00)
new part entry
looking at part 1 (offset 4380672, size 425984, type 0xef)
new part entry
looking at part 2 (offset 0, size 0, type 0x00)
new part entry
looking at part 3 (offset 0, size 0, type 0x00)
new part entry
Exiting MS-DOS parser
MSDOS partition table detected
containing partition table scheme = 0
got it
Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?
Error: Both the primary and backup GPT tables are corrupt. Try making a fresh table, and using Parted's rescue feature to recover partitions.
ped_disk_new() failed


I formatted the drive to clear it, created a new FAT partition and copied the Debian.iso to it again. When I tried again to create a partition in the free space the same error occured.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Add partition to a USB flash drive Debian Installer

#2 Post by Head_on_a_Stick »

Scarecrow2000 wrote:I want to put non free firmware packages on the stick
These ISO images have the non-free firmware already included:
http://cdimage.debian.org/cdimage/unoff ... -firmware/
deadbang

Scarecrow2000
Posts: 36
Joined: 2015-04-16 02:55

Re: Add partition to a USB flash drive Debian Installer

#3 Post by Scarecrow2000 »

Head_on_a_Stick wrote:
Scarecrow2000 wrote:I want to put non free firmware packages on the stick
These ISO images have the non-free firmware already included:
http://cdimage.debian.org/cdimage/unoff ... -firmware/
ok i'll get on of those I hope they have the firmware i need on them.

EDIT: I would be interested to know what the problem was though. I downloaded the new image with the firmware and created the bootable USB, this time it created one bootable partition on the stick. The regular .iso I used previously created 2 partitions.
I

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Add partition to a USB flash drive Debian Installer

#4 Post by Head_on_a_Stick »

Scarecrow2000 wrote:EDIT: I would be interested to know what the problem was though.
I must admit that I skipped the blue bits in your OP 'cos they were a bit difficult to read (I'm getting old).

If you see a similar error again, use this:

Code: Select all

# gdisk /dev/sdX
(Replace "X" with the letter assigned to the stick) If the GUID partition table is damaged, gdisk will give you more information about it and offer to create a fresh GPT header with a properly blanked "MBR" section.
deadbang

Scarecrow2000
Posts: 36
Joined: 2015-04-16 02:55

Re: Add partition to a USB flash drive Debian Installer

#5 Post by Scarecrow2000 »

I tried that, I also tried fdisk to delete partitions but it didnt find any, so I made a new FAT32 partition which I thought would fill up the entire stick.
When I look at the stick the disk utility GUI it sees a second partition, /dev/sdb2 named Debian Jessie. Partition type 0x83. Contents ISO 9660
If I try to delete that in disk utility it says Error: Partition doesn't exist.
I tried formatting it but that didnt get rid of it.
I am going to try a windows machine maybe diskpart clean command might get rid of it.
Last edited by Scarecrow2000 on 2015-05-20 19:10, edited 2 times in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Add partition to a USB flash drive Debian Installer

#6 Post by Head_on_a_Stick »

If you just want to clear the stick, you could try this:

Code: Select all

# dd if=/dev/zero of=/dev/sdX bs=512 count=1
Make absolutely sure you use the correct drive letter in place of "X" or the command may render your system unbootable.

If "disk utility" (whatever that is) still doesn't like it, re-run the command with "count=100" -- that should do it...
deadbang

Scarecrow2000
Posts: 36
Joined: 2015-04-16 02:55

Re: Add partition to a USB flash drive Debian Installer

#7 Post by Scarecrow2000 »

disk utility is a GUI disk management app. It is just easier and quicker to see the partitions in a GUI than it is to read about them. Also it was the only way to see the false partition. gparted and gdisk and fdisk couldnt see the weird sdb2 partition.
Anyway I already put it in my windows machine. The Windows GUI saw it but diskpart wouldnt detect it at all. So I formatted it in Windows.
I put it in my linux machine again the Wondows formatting didnt fix it, the linux disk utility still sees the strange sdb2 partition.
Im going to try and remove it the way you suggested.

Scarecrow2000
Posts: 36
Joined: 2015-04-16 02:55

Re: Add partition to a USB flash drive Debian Installer

#8 Post by Scarecrow2000 »

That worked

Code: Select all

# dd if=/dev/zero of=/dev/sdX bs=512 count=1
Now there is a single partition thanks :)

Post Reply