On 03/21/2011 07:48 PM, Jurrie Overgoor wrote:
I have a system with one disk (/dev/sda) which has two partitions: /dev/sda1 is the main system disk; /dev/sda2 is a recoverydisk. The system is initially installed using an USB stick. At the end of the installation, the USB stick is copied to /dev/sda2. Once in a while, I have the system reboot itself from /dev/sda2, to 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.

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'.

Again: this used to work, and now it doesn't.

I was wrong here. I use VMvare Player to test the FAI install disk. I mount it as an .iso. Turns out that VMware doesn't disconnect the .iso on subsequent boots. This is normally not a problem: you boot into the freshly installed system. But when you tell Grub to reboot from the recovery disk and restart the VM, FAI goes looking for an install medium. In my case, it detected the .iso before it would detect /dev/sda2. So, it re-installed from the .iso; not from the /dev/sda2 partition (as I mistakenly thought it did). So, using VMware Player, once you've installed with FAI, you should disconnect the .iso explicitly. Something one needs to be aware of... :)

Jurrie

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Antwort per Email an