bouilloncube fails creating partition table

Bug #510066 reported by krgn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bouilloncube
Fix Committed
Critical
krgn

Bug Description

sudo ./make-live-device.sh /home/karsten/iso/puredyne-910-carrot_and_coriander-DVD.iso /dev/sdb

fails with this output:

[?] Are you sure your target is /dev/sdb ? (y/n)y
[*] mounting ISO
[*] ISO file is 1172 MB
[*] force unmounting partitions from /dev/sdb
[*] erasing target's partition table
[*] creating system partition of 1222 MB
parted: invalid token: primary
Error: Expecting a file system type.
Error: Partition doesn't exist.
[*] force unmounting partition /dev/sdb1
umount: /dev/sdb1: not found
mkfs.vfat 3.0.3 (18 May 2009)
/dev/sdb1: No such file or directory
[*] creating persistence partition
parted: invalid token: primary
Error: Expecting a file system type.
[*] force unmounting partition /dev/sdb2
umount: /dev/sdb2: not found
mke2fs 1.41.9 (22-Aug-2009)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
[*] copying live folder
mount: special device /dev/sdb1 does not exist
/mnt/make-live-iso ~/code/bzr/bouilloncube/sh
/mnt/make-live-device/./extra
/mnt/make-live-device/./extra/grub
/mnt/make-live-device/./extra/grub/grub.cfg
/mnt/make-live-device/./extra/grub/menu.lst
/mnt/make-live-device/./isolinux
/mnt/make-live-device/./isolinux/boot.cat
/mnt/make-live-device/./isolinux/exithelp.cfg
/mnt/make-live-device/./isolinux/f1.txt
/mnt/make-live-device/./isolinux/f10.txt
/mnt/make-live-device/./isolinux/f2.txt
/mnt/make-live-device/./isolinux/f3.txt
/mnt/make-live-device/./isolinux/f4.txt
/mnt/make-live-device/./isolinux/f5.txt
/mnt/make-live-device/./isolinux/f6.txt
/mnt/make-live-device/./isolinux/f7.txt
/mnt/make-live-device/./isolinux/f8.txt
/mnt/make-live-device/./isolinux/f9.txt
/mnt/make-live-device/./isolinux/isolinux.bin
/mnt/make-live-device/./isolinux/isolinux.cfg
/mnt/make-live-device/./isolinux/live.cfg
/mnt/make-live-device/./isolinux/menu.cfg
/mnt/make-live-device/./isolinux/prompt.cfg
/mnt/make-live-device/./isolinux/splash.png
/mnt/make-live-device/./isolinux/stdmenu.cfg
/mnt/make-live-device/./isolinux/vesamenu.c32
/mnt/make-live-device/./LICENSE
/mnt/make-live-device/./live
^C~/code/bzr/bouilloncube/sh /mnt/make-live-iso
[*] sylinux configuration
/dev/sdb1: No such file or directory
[*] cleaning up, unmounting and ...
umount: /mnt/make-live-device: not mounted
[*] ...done.

note the line:
parted: invalid token: primary

this is the process I use:
-plug in the stick
-stick gets automounted as /media/disk
-exectute command line above

I can fix the problem when I manually re-create a partition table as msdos and re-run the script

krgn (karsten-goto10)
Changed in bouilloncube:
importance: Undecided → Critical
Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

At a guess (and a general consideration too): the script seems to assume that the device has a valid partition table to start with, and deletes the partitions on it one by one. I'm not sure if the order in which partitions are deleted is handled correctly (extended partitions must go before their owner primary partitions at a guess?), but I think it's the wrong approach anyway: As the device will be wiped anyway, it might be better to use dd to wipe the partition table to a known pristine/clean state before starting to avoid bugging out when an unusual partition table is encountered?

http://bazaar.launchpad.net/~puredyne-team/bouilloncube/devel/annotate/head%3A/sh/make-live-device.sh#L77

Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

can you attach output of these commands:

sudo dd if=/dev/sdb of=usb.mbr bs=512 count=1
sudo parted -s /dev/sdb print >parted.txt

Revision history for this message
krgn (karsten-goto10) wrote :
Revision history for this message
krgn (karsten-goto10) wrote :
Revision history for this message
krgn (karsten-goto10) wrote :

this seems to fix the problem

=== modified file 'sh/make-live-device.sh'
--- sh/make-live-device.sh 2010-01-16 11:29:09 +0000
+++ sh/make-live-device.sh 2010-01-20 13:27:42 +0000
@@ -78,6 +78,8 @@
 for v_partition in $(parted -s $2 print|awk '/^ / {print $1}'); do
     parted -s $2 rm ${v_partition}
 done
+#create a new msdos disk label
+parted -s $2 mklabel msdos

 # prepare system partition
 SYSPART=`expr $ISOSIZEMB + 50`

Revision history for this message
krgn (karsten-goto10) wrote :

I pushed some changes to the syslinux version of the script that fixes the problem, hence closing this bug.

Changed in bouilloncube:
status: New → Fix Committed
assignee: nobody → krgn (karsten-goto10)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.