You are not logged in.
Hi all,
I put this in the "newbie" corner 'cause I just joined today, I couldn't find a specific "AIF" sub-forum, but anyway:
I used the latest Arch (x86_64) net-install and "dd"d it onto a usb-stick;, booted ok, logged in as root, then mounted my external usb-dirive and copied over my modifed "generic-install-...-sda script over to "/"
#aif -p automatic -c /generic-install-..sda
Note: I managed to use my (below) modified /usr/share/aif/examples/generic-install-...sda script, and I was able to sucessfully partition my disks,... with it.
However,
It failed at all the package getting parts (couldn't sync-db,.. errors, /mnt/... errors,... ?), even after I configured my network for dhcp ok.
Questions:
1./ I'm sorry if I'm cutting directly to the chase here, but does anyone have a "working" AIF script to "automatically" do a net-install of Arch, ?
2./ Also, how is this AIF "automated" ?. What I mean is, I cannot "write" to my boot usb/cd of arch(.iso), instead, I have to mount an external drive and then copy my (modified)AIF script over after it initally boots up. Is there a way to do this better ?
----- here is my basic script-----------------------------------------------------------------------------------------
# this config explains the (all) available options.
# the variables are optional and we define their defaults here (so you could omit the
# definitions), unless otherwise specified.
SOURCE=net
SYNC_URL='ftp://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch'
HARDWARECLOCK=UTC
TIMEZONE=America/Toronto
RUNTIME_REPOSITORIES=
RUNTIME_PACKAGES=
# packages to install
TARGET_GROUPS='base base-devel'
TARGET_PACKAGES_EXCLUDE=
TARGET_PACKAGES=openssh
# you can optionally also override some functions...
worker_intro () {
inform "Automatic procedure running the generic-install-on-sda example config. THIS WILL ERASE AND OVERWRITE YOUR /DEV/SDA. IF YOU DO NOT WANT THIS PRESS CTRL+C WITHIN 10 SECONDS"
sleep 3
}
worker_configure_system () {
prefill_configs
sed -i 's/^HOSTNAME="myhost"/HOSTNAME="goofy"/' $var_TARGET_DIR/etc/rc.conf
sed -i 's/^interface=/interface="eth0"/' $var_TARGET_DIR/etc/rc.conf
sed -i 's/^DAEMONS=/#DAEMONS=/' $var_TARGET_DIR/etc/rc.conf
echo 'DAEMONS=(!hwclock syslog-ng dbus hal network !netfs @alsa @sshd crond)' >> $var_TARGET_DIR/etc/rc.conf
}
# These variables are mandatory
GRUB_DEVICE=/dev/sda
PARTITIONS='/dev/sda 1000:ext2:+ 8192:swap 20000:ext4'
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params'
BLOCKDATA='/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params'
BLOCKDATA='/dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
------------------------------------ end of script -----------------------------------------------------------------------------------------
thanks much.
Rick.
Last edited by scjet (2011-08-12 15:42:21)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
What were the errors? Can you e.g. ping a server?
Offline
Moved to Installation.
ᶘ ᵒᴥᵒᶅ
Offline
What were the errors? Can you e.g. ping a server?
thx for reply,
I'll try to get some more detaled errors, maybe in /var/log/... ?
and btw, I'm NOT trying any "PXE" installs (aka from a boot server, like kickstart?, that'll be later
Again, I want to just have a more automated "net-install" of the latest Arch+packages onto standalone PC with networking,... pre-configured.
Hence, why AIF looks to fit the bill.
thx again.
Last edited by scjet (2011-07-23 18:11:35)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
What were the errors? Can you e.g. ping a server?
Yes, after I do "aif -p partial-configure-network" (and configure eth0 for dhcp) I can ping google.com,... or whatever, succesfully.
-the network is obviously ok.
And yes, just to be clear, I ran "aif -p partial-configure-network", (and made sure network/dhcp was ok), before I ran my "aif -p automatic -c /<script above>
I guess my (above)script is simplistic, and maybe there is a lot more automated sub-scripts, and <$variables> that need to be specifically considered to actually even make this work, other than what the "AIF" wiki sparingly gives out ?
But other "aif" output Errors: ?
yep, lots of them:
Right after my script successfully partitions/formats my /dev/sda disk It seems to only mount boot, dev, proc, sys, var (onto /mnt)
It then fails becuase it cannot find "/mnt/etc/...., and then of course, sed, awk and chroot fails ?
Here's some rather minimilistic log files from aif, in /var/log ? (maybe "aif" has an option to turn verbose up a little more ?- that would be nice).
Sry, but this is all I could dig up at this time.
/var/log/aif/mkinitcpio.log:
chroot: failed to run command 'sbin/mkinitcpio'
/var/log/aif/pacman.log:
error: 'opemssh': not found in sync db
openssh package not found, searching for group.
mm, I'll try aif again with the "aif" -d, or -l options, and maybe it will log more "details" ?
thx again.
Last edited by scjet (2011-07-23 19:25:53)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
All Solved:
In my script above I changed:
SYNC_URL='ftp://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch'
to
SYNC_URL=ftp://mirror.csclub.uwaterloo.ca/archlinux/\$repo/os/x86_64
and then, everything else worked fine.
"#Linux goofy 2.6.39-ARCH #1 SMP PREEMPT Sat Jul 9 14:57:41 CEST 2011 x86_64 AMD Phenom(tm) II X2 555 Processor AuthenticAMD GNU/Linux"
I misinterpreted the instructions in
https://wiki.archlinux.org/index.php/Of … _Procedure, where it "plainly" says:
"...Note that these files are plain bash files, so if you want to define for example SYNC_URL it must be singlequoted to prevent bash expanding $repo..." ???
So, once I removed those particular single-quote's, and just "excaped" the "$"repo with a "\" instead, it installed everything.
.... and obviously don't forget to configure you network 1st too otherwise it ain't goin' nowhere.
Anyway, on my PC/standalone at home with simple dhcp this automated aif now works great.
Thanks.
I would like to mark this as partially solved only though, since I still need help with "Question # 2./" above ???
woah, sry my bad. This is also all good now.
fdisk a 2nd parttion on the USB schtick and its good to go.
Or,
http://archlinux.me/brain0/2010/05/29/a … uce-media/
Last edited by scjet (2011-07-27 03:54:50)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
Hey,
I must say Thanks to the great work by "Dieter@be" and everyone else, for this cool AIF tool.
Rick.
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
...anyway continuing on a minor note!:
Output errors: (during the initial AIF script)
...
Phase 1: Creating filesystems and blockdevices
WARNING: Could not create all needed file systems. Either the underlying blockdevices didn't become available in 10 iterations, or process_filesystem failed
Phase 2: Mounting filesytems
ERROR: process_filesystem needs a partition as $1
...
However, if I re-run my "aif -p automatic -c /x64_02.bash" again, it grabs the disks and partitions/formats them accordingly.
I have no idea why I have to run my automated AIF script twice everytime but hey ?
Of course, I did a maual long install and there were no problrms with my disk,...
should there be a "sleep" thrown in the disk creation/patition parts to give it time to setup properly ?,
------------------------------ here the partial script again -------------------------
# These variables are mandatory
GRUB_DEVICE=/dev/sda
PARTITIONS='/dev/sda 1000:ext2:+ 8192:swap 20000:ext4'
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params'
BLOCKDATA='/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params'
BLOCKDATA='/dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
----------------------------------------------------------------------------------------------------
thx again.
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
[SOLVED]
More self-inflicted wounds.
I 'single-quoted' each seperate BLOCKDATA=' ... ' line as mentioned directly above. But that turned out to be wrong.
Instead I modified it back to the CORRECT way for the bash script to interpret/parse the "BLOCKDATA" variable, as per the "/usr/share/aif/examples/generic-install-on-sda" example file, doh!
-----------------------------------------------------------------------------------------------------------
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
/dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
-----------------------------------------------------------------------------------------------------------
everything auto installs like a charm now.
thx.
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
Glad to hear you fixed it, please mark the thread as solved by adding '[solved]' to the thread's title.
Offline
Glad to hear you fixed it, please mark the thread as solved by adding '[solved]' to the thread's title.
I don't seem to have access permissions (or, I don't know how ?) to modify my Title to say [SOLVED]
So, if one of the admin's want to do that, then fine, or you can tell me how. ?
thx.
Rick.
Last edited by scjet (2011-08-12 15:41:41)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline
You need to edit your first post. This way you ca edit the title too :-)
Offline
You need to edit your first post. This way you ca edit the title too :-)
gotcha, doh! ,
I'm so spoiled with "googe"ling solutions I'm forgetting how to use a forum all the time.
Last edited by scjet (2011-08-12 15:44:56)
The "BSD" things in life are "Free", and "Open", and so is "Arch"
Offline