Bug 506886

Summary: gparted creates an unbootable usb stick.
Product: [Fedora] Fedora Reporter: Luke Macken <lmacken>
Component: livecd-toolsAssignee: Jeremy Katz <katzj>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 11CC: davidz, katzj, pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-19 17:19:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luke Macken 2009-06-19 06:35:09 UTC
Description of problem:

After doing a complete wipe of a USB stick, using Gparted to lay down a new partition table and a FAT32 partition yields an unbootable Master Boot Record..

I hit this problem while testing the liveusb-creator, and it causes your stick to boot up to a black screen with a blinking cursor.  A workaround could be to ensure that the system-wide mbr.bin matches what is on the drive?

[root@x300 ~]# dd if=/usr/share/syslinux/mbr.bin bs=512 count=1 2>/dev/null | hexdump -n 2 | head -n 1 | awk {'print $2;'} 
31fa

After zeroing out drive, and doing a fresh msdos partition table in Gparted

[root@x300 ~]# dd if=/dev/sdb bs=512 count=1 2>/dev/null | hexdump -n 2 | head -n 1 | awk {'print $2;'}
b8fa

Using `livecd-iso-to-disk --reset-mbr` fixes this issue, but I have seen many people hit this problem and it is not obvious what causes it.

Version-Release number of selected component (if applicable):
git HEAD of livecd-tools
gparted-0.4.5-1.fc11.x86_64
parted-1.8.8-17.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
0. dd if=/dev/zero of=/dev/sdb1 bs=1024 count=1
1. Open up gparted, lay down a new msdos partition table
2. Create a new FAT32 bootable partition
3. Run the livecd-iso-to-disk (without --format or --reset-mbr)
  
Actual results:
Machine boots to a blank screen with a blinking cursor

Expected results:
USB Stick should boot into Fedora

Comment 1 Jeremy Katz 2009-06-19 17:19:33 UTC
livecd-iso-to-disk checks for a blank MBR already (see checkMBR() ), but we can't really do much more that checking for blank -- the syslinux mbr is just one implementation; a stock out of the factory bootable USB stick is almost certain to have a different one (as it will have been an image of something done with dos/windows formatting tools)