You are not logged in.

#1 2012-07-24 01:24:27

beatgammit
Member
Registered: 2012-04-25
Posts: 18

AIF- Install to existing partitions dynamically

I am trying to build a system where I can set up partitions on a machine then net-install Arch with a config file. This makes setting up new Arch systems really easy and fast, withouth having to go through the interactive mode each time.

I currently have this:

http://pastebin.com/Ff9vfBuS

I'm getting this output:

Welcome to Arch Linux Installation Framework
The following partition setup will be used:
/dev/sda3 raw Arch ext4;yes;/;target;no_opts;Arch;no_params
/dev/sda1 raw Arch-boot ext2;yes;/boot;target;no_opts;Arch-boot;no_params
/dev/sda2 raw swap swap;yes;no_mountpoint;target;no_opts;swap;no_params
This is your last chance to abort. Install starting in 3 seconds.
Phase 1: Creating filesystems & blockdevices
Phase 2: Mounting filesystems
Done processing filesystems/blockdevices
Server = http://mirrors.xmission.com/archlinux/${repo}/os/${arch}
Refreshing package database...
Generating glibc base locales...
WARNING: Preconfigure failed
Beware: the following steps failed: initial locale, keymap/font setting, mirrorlist configuration, time configuration. Please report this. Continue at your own risk
Rebuilding initcpio images ...
WARNING: MKINITCPIO FAILED - SYSTEM MAY NOT BOOT
chroot: failed to run command `/sbin/mkinitcpio': No such file or directory
chroot: failed to run command `/sbin/mkinitcpio': No such file or directory
chroot: failed to run command `/sbin/mkinitcpio': No such file or directory
Generating glibc base locales...
WARNING: Preconfigure failed
Beware: the following steps failed: mkinitcpio creation, locale generation, localtime copying. Please report this. Continue at your own risk
Generating GRUB device map...
This could take a while.

 Please be patient.
Execution Report:
-----------------
Phase preparation: Success
 > Worker configure: Sucess
 > Worker intro: Sucess
 > Worker sysprep: Sucess
 > Worker select_source: Sucess
 > Worker runtime_network: Sucess
 > Worker runtime_repositories: Sucess
 > Worker runtime_packages: Sucess
Phase basics: Success
 > Worker set_clock: Sucess
 > Worker prepare_disks: Sucess
Phase system: Failed
 > Worker package_list: Sucess
 > Worker install_packages: Failed
 > Worker configure_system: Failed
 > Worker install_bootloader: Failed
Phase finish: Success
 > Worker msg_report: Skipped

It seems that it's missing some kind of environment variable (since I didn't partition), but I'm not sure what. The wiki gave an example of how to avoid partitioning, so I'm trying to build off that. Basically, I'd like to avoid partitioning (recreating partitions), but use BLOCKDATA for the filesystems (format them and install everything there).

I don't have much of a problem with filling out PARTITIONS, but I don't know what order the data is used there. From the documentation, it seemed sequential (/dev/sda1, /dev/sda2, etc...), and I don't think it uses any information from BLOCKDATA, which is why I tried so hard to avoid it. The only reason I have anything in PARTITIONS is because the install will fail before attempting to install (it checks if PARTITIONS is empty), so I've put garbage in it.

Is what I'm trying to do supported? I'd like to be able to run this on a machine with other partitions on it, while leaving them intact.

I'm running this on archlinux-2011.08.19-netinstall-i686.iso

Offline

#2 2012-07-24 02:19:54

scjet
Banned
Registered: 2011-07-23
Posts: 172

Re: AIF- Install to existing partitions dynamically

AIF uses "Grub-legacy", or "Syslinux" (at present).
I've recently, and successfully used aif via "archlinux-2011.08.19-netinstall-*.iso" but I've had to select syslinux, otherwise it'll crap out eventually if you select grub as your bootloader...
Grub-Legacy has been moved to AUR, and Grub2 has been moved to core/base now.
-it failed becuase you cannot select grub-legacy anymore using aif (only Syslinux). "net-install" will always go out and update all req'd pkgs,..
And unless you really want to hack into aif, I'm not sure if you can avoid the "ask_option" of its bootloader...?.  Then again, I may be wrong, I have never delved into "aif" to that extreme.
hope some of this helps.

Edit: if you don't get yopur answer directly here, you could try politely asking the x-maintainer of aif ->  dieter at plaetinck dot be
he may be able to help you.

Last edited by scjet (2012-07-24 02:28:17)


The "BSD" things in life are "Free", and "Open", and so is "Arch"

Offline

#3 2012-07-24 02:30:51

beatgammit
Member
Registered: 2012-04-25
Posts: 18

Re: AIF- Install to existing partitions dynamically

I really don't think that's my problem. I had this all working before I added my code that grokked the partitions.

Perhaps my question was unclear.

I would like to install to pre-defined partitions so as to not mess with the partition table. I am ok with installing GRUB to the MBR, and I have no problem running grub2-mkconfig or similar to resurrect my other entries. I would just like to skip the partition step and move straight on to filesystem setup.

I assumed that the installer uses PARTITIONS to create partitions, and BLOCKDATA to determine mount-points, with zero overlap. This does not seem to be case, since things break when I skip the partitioning step.  Is there something I'm missing in my script to make up for skipping this step?

I've read through the source (not thoroughly, I must admit), but I can't figure out where I'm going wrong.

Edit:

scjet- I may have to end up doing that. It may very well be a bug in aif. I don't think it's a very common use-case, so I can understand if I don't get a lot of help here.

I just hope that someone else has tried doing something like this already.

Oh, and thanks for the info. I almost forgot to put in post-install code to fix up the boot loader entries when the install finishes. I'm trying for a two-step install (install packages, reboot, configure).

Last edited by beatgammit (2012-07-24 02:34:39)

Offline

#4 2012-07-24 02:34:48

scjet
Banned
Registered: 2011-07-23
Posts: 172

Re: AIF- Install to existing partitions dynamically

sorry no, I have never delved into "aif" to that extreme myself either.


The "BSD" things in life are "Free", and "Open", and so is "Arch"

Offline

Board footer

Powered by FluxBB