KanoComputing / kano-burners

SD Card burner for OSX
GNU General Public License v2.0
12 stars 11 forks source link

kano-burners suggests wrong disk to burn to #29

Open hzulla opened 9 years ago

hzulla commented 9 years ago

Here's my output of parted --list

$ LANG=C sudo parted --list
Model: ATA HGST HTS541010A9 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  106MB   105MB   primary   ntfs            boot
 2      106MB   166GB   166GB   primary   ntfs
 3      166GB   1000GB  834GB   extended
 5      166GB   183GB   16.4GB  logical   linux-swap(v1)
 6      183GB   1000GB  817GB   logical   ext4

Error: /dev/zram0: unrecognised disk label                                

Error: /dev/zram1: unrecognised disk label                                

Model: SD SU04G (sd/mmc)
Disk /dev/mmcblk0: 3965MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  3965MB  3961MB  primary  fat32

If I start kano-burners, this debugging output will appear:

sudo LANG=C ./bin/kano-burner
Running from source
Linux OS detected
Making temp directory
Checking for dependencies..
Internet connection detected
All necessary tools have been found
Free space 189012.56 MB in /tmp/kano-burner/
Sufficient available space
All dependencies were met
Scanning drives..
Listing {'size': 3.965190144, 'id': '/dev/sda', 'name': 'ATA HGST HTS541010A9'}
Ignoring {'size': 1000.204886016, 'id': '/dev/mmcblk0', 'name': 'SD SU04G'}

kano-burners will then offer to burn onto 'ATA HGST HTS541010A9'.

I preferred not to try that. :-/

hzulla commented 9 years ago

Ah, so the error is that src/linux/disk.py is using two different tools, parted and fdisk. But those may return the disks in different order.

styro commented 9 years ago

I had the same thing, but didn't notice until I had closed the window and looked at the shell output.

Running from source
Linux OS detected
Making temp directory
Checking for dependencies..
Internet connection detected
All necessary tools have been found
Free space 32041.73 MB in /tmp/kano-burner/
Sufficient available space
All dependencies were met
Scanning drives..
Listing {'size': 7.94820608, 'id': '/dev/sda', 'name': 'ATA TOSHIBA THNSNH25'}
Ignoring {'size': 256.060514304, 'id': '/dev/mmcblk0', 'name': 'SD SL08G'}
Disclaimer was accepted, starting process
Downloading Kano OS..
Downloading latest OS information
Latest Kano OS image is Kanux-Beta-v1.3.3-release.img
Downloading successfully finished and md5 check passed
Preparing /dev/sda for burning..
[ERROR] umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
[ERROR] umount: /dev/sda2: not mounted
[ERROR] umount: /dev/sda5: not mounted
[ERROR] umount: /dev/sda: not mounted
[ERROR] mkdosfs: unable to open /dev/sda: Device or resource busy
Burning image to SD card on /dev/sda
Burning successfully finished
Polling burner for progress..
Ejecting disk..
[ERROR] umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
eject: unmount of `/' failed
Removing temp files

After lots of futzing around trying to make it recognise the SDCard at all, I finally saw the 7.9GB size for the card listed as the only option and just selected that without properly checking the device label. I probably had a false sense of security having seen that kano-burner checks it won't write to a HD and it never listed the HD at all earlier. So much for that.

The output isn't entirely clear whether it or not it overwrote anything on /dev/sda. It doesn't sound like it did, but just to be sure I'm in the middle of taking a backup before I do anything else.