~alpine/devel

[alpine-devel] improving setup-bootable-usb

Details
Message ID
<AANLkTimiSi-lGjNzxAFppeKoG4CbaBsx67U_BjmzCmPB@mail.gmail.com>
Sender timestamp
1274885141
DKIM signature
missing
Download raw message
Hi,

I have renamed the setup-booable-usb tool to setup-bootable. (anyone
ever used that tool btw?)

I have also made some modifications to it. It can now take any
(1.10.x? and newer) iso, or mounted cdrom and make a CF, harddisk or
usb stick bootable from that. For example:

 # boot cdrom, insert usb and make it bootable:
 setup-bootable /media/cdrom /dev/usbdisk

 # make bootable CF from iso image. this will chage syslinux.cfg to
use alpine_dev=sdb1:vfat
 setup-bootable alpine-vserver-1.10.3-x86.iso /dev/sdb1

It can also upgrade an already existing install. This will keep
existing syslinux.cfg. For example:

 # upgrade mounted CF which we booted from, using iso image, with verbose output
 setup-bootable -u -v alpine-1.10.3-x86.iso /media/sda1

The upgrade process will do this:
* create a temp direcotry .new on target
* copy all files from iso to .new
* sync, so we know files are there.
* create a temp .old directory on target
* move existing files/dirs to .old: boot, apks, .alpine-version
* move .new files to ..
* remove .old
* sync and cleanup

The idea is to try keep system bootable even if somethign goes wrong
during the way (power failuer whatever). Its only after the first
sync, while doing the renames, that things are critical. This is a
very short and fast operation so chances are relatively small that
things goes wrong.

The setup-bootable wil be shipped with alpine-conf-2.4 (edge) but I
made it available on
http://dev.alpinelinux.org/~ncopa/alpine/setup-bootable
(It is ofcourse also available from
http://git.alpinelinux.org/cgit/alpine-conf/ )

Feedback is welcome.

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)