Project

General

Profile

Actions

Bug #265

closed

Replace tar extract with dd in mkinstall

Added by Hammel almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
05 - Releases
Target version:
Start date:
14 Jan 2014
Due date:
% Done:

100%

Estimated time:
Severity:
02 - High

Description

mkinstall mounts the rootfs dir and copies to it in an attempt to make the entire 2nd partition available after installation to the SD card. However, this often fails when trying to set the root user on all those files, possibly because the chown is running while data is still being pushed to the SD card.

To get around this I can create the ext3 image for the rootfs in buildroot.mk (the target is already there) and copy it to the pkg directory with buildroot-pkg. Then the mkinstall can be updated to remove the tar extraction line for the rootfs and replace it with these lines (before the partition is mounted):

sudo dd if=rootfs.ext3 of=$ROOTFSDIR bs=16384
sudo e2label $ROOTFSDIR rootfs
sudo e2fsck -f $ROOTFSDIR
sudo resize2fs $ROOTFSDIR

where the rootfs.ext3 filename should be made a variable like $RAMDISK (which currently points to the rootfs.tar file).

This will use dd to write to the disk first, then set the proper label, clean up the filesystem and then resize the filesystem to match the partition size. After that the partition can be mounted the the chown run.

Actions #1

Updated by Hammel almost 11 years ago

  • % Done changed from 0 to 50

Updates added and pushed upstream. Awaiting a full test with packaging.

Actions #2

Updated by Hammel almost 11 years ago

  • Status changed from New to Closed
  • % Done changed from 50 to 100

Tested with packaging. Works much better. I have had no lockups yet using this method, while with tar to the SD card was slower and often locked up requiring a host reboot.

Closing issue.

Actions

Also available in: Atom PDF