1 (edited by kubuist 2015-05-26 02:24:40)

Topic: SOLVED: gparted live usb problem using dd

I recently wanted to create an up to date gparted-live thumb drive.
I downloaded the .iso and used dd to copy across to the usb device. (4Gb with one FAT32 partition)
My pc is 64bit with UEFI.
Several things looked wrong.
The thumb drive wasn't recognized as UEFI enabled by my PC.
When the program started up Gparted announced that the thumb drive had a recursive partition.
It also appeared that the Partition Table overlapped with the partition /dev/sdx1.
I spent some time trying to correct errors on the thumb drive but made no headway.

Next I tried an alternative install, Method B for Linux using the .zip file on the same drive.
This time UEFI function was recognised, no partition or partition table errors were reported.

I suspect that something happens when dd copies the .iso and that this is why I was getting those errors.

Method B was a good workaround and easy enough to perform. I always liked dd but will hold off until this glitch is addressed.

I have reported this as a bug.

I do not have the expertise to address this problem, though I have used linux for a number of years.

2

Re: SOLVED: gparted live usb problem using dd

I had the same experience just now as did kubuist in Post #1.

I did not try Method B as he did.

My issue was with the dd of the iso to the flash drive (FAT32, 8 GiB).

I tried two versions of the amd64, the newer -22 and the previous -21:

sudo dd if=gparted-live-0.22.0-1-amd64.iso of=/dev/sdc bs=8M
sync
and
sudo dd if=gparted-live-0.21.0-1-amd64.iso of=/dev/sdc bs=8M
sync

Same result: My PC did not recognize it as a UEFI boot choice; it DID see it as a BIOS boot choice, though. GParted's main menu indicated it was booted in BIOS mode (it was a "*" footnote at the bottom of a main GParted menu screen).

There seems to be a problem with that iso not setting up a proper UEFI installation and bootloader.

(I have not had any other problems writing iso's using dd to (bootable, live) flash drives with other files such as apps or OSs.)

3 (edited by kubuist 2015-05-19 10:39:21)

Re: SOLVED: gparted live usb problem using dd

performed on thumb drive containing gparted-live-0.22.0-1-amd64

sudo fdisk -lu /dev/sdd

gives

Device     Boot Start    End Sectors  Size Id Type
/dev/sdd1  *        0 464895  464896  227M 17 Hidden HPFS/NTFS

I think this is due to an error in the set up. The start should not be at zero and the Type is also wrong

the last line should look similar to this:

Device     Boot Start      End  Sectors  Size Id Type                                                  
/dev/sdd1  *       63 15727634 15727572  7.5G  c W95 FAT32 (LBA)

taken from a properly performing thumb drive with a different iso but made in the same way.


Copying the iso file to usb drive with dd is not producing a properly functioning Gparted live disk.
I do not have the skills to remedy this situation.

4

Re: SOLVED: gparted live usb problem using dd

this is a separate issue but I'll mention it here

the answer to the anti-bot question needed to access these Forums was very difficult to find even for a NON-bot.
I couldn't see it on the Gparted web site even after many minutes searching. I got it eventually by Googling.
It makes me wonder how many have tried to access these Forums and have just given up because that search was just too big a hurdle.

5

Re: SOLVED: gparted live usb problem using dd

Thank you for reporting this problem and also confirming that method B does work.

I have forwarded this issue to our Live Image maintainer.

6

Re: SOLVED: gparted live usb problem using dd

Thanks for what I consider to be an excellent utility.

7

Re: SOLVED: gparted live usb problem using dd

@kubuist,
There is no "dd" method mentioned on http://gparted.org/liveusb.php
Actually "dd" is not a good way to make bootable USB flash drive, because it will overwrite everything on the USB flash drive, and it has compatibility issue. Say if you have a 4 GB drive, using dd to write gparted-live iso to that drive, then you won't make use all of the 4 GB space. The rest is not seen. Not to mention what you have report, it's not working for UEFI machine.
Therefore, I do not think it's a bug for GParted live. It's the the restriction for dd.

Steven.

8 (edited by kubuist 2015-05-20 13:38:08)

Re: SOLVED: gparted live usb problem using dd

@ stevenshiau

thanks for your reply

the method I am referring to is at the bottom of the page http://gparted.org/liveusb.php that you mention

it is called "GNU/Linux Method D: Manual - Overwite" <---(should be Overwrite BTW [minor spelling mistake])

Here it is quoted in full:

--------------------------------------------------------------------------------------------------------------------------
GNU/Linux Method D: Manual - Overwite

WARNING:   Confirm you have the correct device path name before executing commands!

This method will overwrite the destination device. Hence it is critical to select the proper USB flash device.

Since GParted Live is based on Debian Live and this image is a isohybrid, the GParted Live CD image can be written directly to a USB flash drive.

Download the GParted Live iso file.
Insert the USB flash drive your Linux computer and wait a few seconds. Next, from a terminal window run the command:

dmesg

This command queries the device name of the USB flash drive. For example, you might find the device name is /dev/sde.
From a terminal window, enter the following command using the gparted .iso file name and USB device path you discoved in the previous steps.
For example:

sudo dd if=/path-to-gparted-live.x.y.z-w.iso of=/dev/sde bs=4M; sync
--------------------------------------------------------------------------------------------------------------------------

I don't want to lecture, but this method does work for the Kubuntu iso and as it is suggested as a Method on the Gparted website one would also expect it to work as put forward.
As for whether it is a good method or bad, I do not have expertise in coding and would not want to argue that one.
Perhaps then the bug is that the Website suggests that it is a viable method, whereas you recommend that it isn't.

I have spent some time trying to get to the bottom of this. I realise that the recent iso for Gparted-live that is on offer might not be isohybrid, but if so then a note to explain that, or a note explaining that dd is not a good method with Gparted-live iso's could be useful.

but please check it out, properly, that Method definitely is proposed on the Gparted website.


I am happy to work with you, if it helps, to resolve this issue.

9

Re: SOLVED: gparted live usb problem using dd

the answer to the anti-bot question needed to access these Forums was very difficult to find

I completely agree.  Very confusing, at first I thought it was a puzzle of sorts, noticing references to a "pun."  Or perhaps I need to disable NoScript.  I tried that and many things.  Only quite by accident did I find the answer after clicking through the GParted pages.

There most certainly is a dd method listed here, at the very bottom of this page:
http://gparted.org/liveusb.php

As kubuist reported, I also have excellent results using dd to make the live USB flash drives I need.  This is the first hang-up in that successful record.  You can easily make it UEFI-bootable and recognized by firmware, listed as a NVRAM variable, identified and bootable by rEFInd, and so on.  Usually, you dedicate a thumb drive to just one application: one for GParted, one for live Kubuntu 14.04, one for Boot Repair, etc.  Thumb drives are inexpensive (Amazon), GiB's now are cheap (except on SSD's).

Btw, I love GParted, have used it for years, and I recommend it as a first step to everyone at kubuntuforums before installing Kubuntu.  This dd-thing is just a little glitch.  I successfully use the bootable CD all the time, or the gparted installed to my OSs.

Thanks for your attention and assistance.

10

Re: SOLVED: gparted live usb problem using dd

This issue is being followed up in Bug 749500 - GParted Live .iso not bootable on UEFI if dd'd to USB drive.

11 (edited by kubuist 2015-05-26 10:14:36)

Re: SOLVED: gparted live usb problem using dd

I successfully created a working GpartedLive  thumb drive using the latest download file. (gparted-live-0.22.0-2-amd64.iso)
Thanks to those who worked to get this bug fixed. The problem is solved and I have marked it as such.

12

Re: SOLVED: gparted live usb problem using dd

(I'm awaiting a reply to my request to register at GNOME Bugzilla.)

I tested the new test GParted testing iso and it works great.

Here:
https://bugzilla.gnome.org/show_bug.cgi?id=749500
This:
http://sourceforge.net/projects/gparted … -amd64.iso

I did this slightly differently than kubuist in preparing the flash drive.

First, we both reported the error obtained with the previous version of GParted.  I also got that error upon running fdisk on the GParted flash drive:

sudo fdisk -lu
Error: Invalid partition table - recursive partition on /dev/sdb.

I took that same flash drive and simply zero-ed it out with dd:

mike@mike-desktop:~$ sudo dd if=/dev/zero of=/dev/sdb bs=16M
dd: error writing ‘/dev/sdb’: No space left on device
485+0 records in
484+0 records out
8127512576 bytes (8.1 GB) copied, 1239.65 s, 6.6 MB/s

Then without creating any partition table (i.e., no partitioning, no formatting--just the "raw" cleared-out flash drive), I ran this dd:

mike@mike-desktop:~/Downloads$ sudo dd if=gparted-live-0.22.0-2-amd64.iso of=/dev/sdb bs=16M
14+1 records in
14+1 records out
241172480 bytes (241 MB) copied, 39.713 s, 6.1 MB/s

Re-booting the PC with this live GParted flash drive, entering my UEFI firmware setup (ASUS H-97 Plus motherboard), the flash drive showed up both ways, as a UEFI bootable choice and as a BIOS=legacy-CSM choice:

UEFI: (FAT) KingstonDataTraveler 2.0 (7751 MB)
and as
KingstonDataTraveler 2.0 (7751 MB)

I booted to the UEFI entry. And it booted perfectly, fast, it did its configuring, and opened with the GParted screen with no error messages.

Perfect.  Thanks for the great work.