[setup_storage] parted non-zero exit code

Michael Tautschnig mt at debian.org
Sun Mar 27 19:21:14 CEST 2011

Hi Jurrie,

Sorry for the late reply.

> >perform a "reset to factory defaults" install. This always went
> >ok, untill recently... I recreated the fai-mirror, made a new
> >fai-cd, and put this on the recoverydisk.
> >

Although you gave reasons for why that used to work below anyway, there could
also be one more reason: setup-storage used to ignore non-zero exit codes of
subcommands and would only print a warning. This has been changed in some pretty
recent release.

> >Now, I get the error:
> >Executing: parted -s /dev/sda mklabel msdos
> >Command had non-zero exit code
> I fixed it! Marking the disk as 'virtual' skips the parted commands
> that give errors. The partition is still reformatted though, and on
> a re-install, this is the only thing I want. The other commands are
> not needed on a re-install, only on a first-time install.
> So what I did was make two classes: FRESH, and RECOVERY. A script
> decides (based on the existence of /dev/sda1 and /dev/sda2) if we
> are doing a FRESH install, or a RECOVERY install. FRESH's
> disk_config is a normal one, RECOVERY's disk_config is a copy of
> FRESH's, but then with the disk marked 'virtual'.

I think you should also be able to use the following disk config if you go for
the experimental builds. This would then supposedly work with a single config,
in all cases:

disk_config disk1 disklabel:msdos fstabkey:uuid bootable:1 preserve_lazy:all always_format:1
primary   /   5G-   ext3   rw,noatime,errors=remount-ro createopts="-L root" tuneopts=""
primary   -   2G   ext3   rw,noatime   createopts="-L recoverydisk" tuneopts=""


The only change here is the preserve_lazy:all that will magically also keep
setup-storage from executing any parted commands. 

Hope this helps,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20110327/9aada73f/attachment.bin>

More information about the linux-fai mailing list