You are not logged in.

#1 2012-09-20 08:06:26

altercation
Member
From: Seattle
Registered: 2011-05-15
Posts: 136
Website

Minimal Arch install script - EFI/GPT gummiboot with LUKS

Might be of use to others, this is a stripped down non interactive install script for a single disk, three partition, encrypted root & swap install. It uses gummiboot from AUR.

I've been working on using the gummiboot in extra but haven't had success getting it to function, yet.

https://github.com/altercation/archstone

(Also, I'm working on unifying the install process so that you don't need to manually arch-chroot. Later on that.)


Ethan Schoonover
Precision Colors - http://ethanschoonover.com/solarized

Offline

#2 2012-09-21 00:51:07

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

altercation wrote:

(Also, I'm working on unifying the install process so that you don't need to manually arch-chroot. Later on that.)

In my script I just prefix each command with 'chroot /mnt', like e.g.

chroot /mnt locale-gen
chroot /mnt mkinitcpio -p linux
chroot /mnt su - martin -c "curl -s http://aur.archlinux.org/packages/dw/dwb-hg/dwb-hg.tar.gz | tar xzC /tmp && cd /tmp/dwb-hg && makepkg -si --noconfirm"

Offline

#3 2012-09-21 01:07:47

altercation
Member
From: Seattle
Registered: 2011-05-15
Posts: 136
Website

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

mhertz wrote:

In my script I just prefix each command with 'chroot /mnt', like e.g.

arch-chroot does pass the command line arguments on to chroot but I get some weird failures. with just chroot I can pass a script in the same manner as you use, but with arch-chroot this chokes during mkinitcpio.

FWIW, you can also redirect all those commands to chroot in one go:

chroot /mnt << YEOLDECOMMANDS
locale-gen
mkinitcpio -p linux
su - martin -c "curl -s http://aur.archlinux.org/packages/dw/dwb-hg/dwb-hg.tar.gz | tar xzC /tmp && cd /tmp/dwb-hg && makepkg -si --noconfirm"
YEOLDECOMMANDS

Ethan Schoonover
Precision Colors - http://ethanschoonover.com/solarized

Offline

#4 2012-09-21 01:49:42

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

I haden't read your script sorry, and just thought from your post that you didn't knew the "non-interactive chroot method"...

I don't know why it fails with arch-chroot, but why don't you just use chroot then ?

In my script I don't use pacstrap and arch-chroot, but just run the needed commands directly instead. I do that so I don't need to change the script if the aif ever comes back and Dave's install-scripts maybe gets removed ...

As you know, for mkinitcpio not to fail, then you need to mount the pseudo-filesystems first, but as arch-chroot also does that, then I don't know why it fails with it...

Thanks for your heredocs tip btw... I did knew it, but still hadent used it, dunno why smile

Offline

#5 2012-09-21 03:44:43

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

altercation wrote:
mhertz wrote:

In my script I just prefix each command with 'chroot /mnt', like e.g.

arch-chroot does pass the command line arguments on to chroot but I get some weird failures.

It'd be nice to actually post those failures... if there's a bug in arch-chroot or room for improvement, I'd like to fix it.

Offline

#6 2012-09-21 04:38:01

altercation
Member
From: Seattle
Registered: 2011-05-15
Posts: 136
Website

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

mhertz wrote:

I haden't read your script sorry, and just thought from your post that you didn't knew the "non-interactive chroot method"...

I don't know why it fails with arch-chroot, but why don't you just use chroot then ?

In my script I don't use pacstrap and arch-chroot, but just run the needed commands directly instead. I do that so I don't need to change the script if the aif ever comes back and Dave's install-scripts maybe gets removed ...

Yeah, I did build an installer without pacstrap and arch-chroot as well but then figured I'd try to play nice with the new scripts. They are pretty nice helpers and I think I'll try to get this working with them first, but if I don't I'll go back the plain-old method as you suggest smile

mhertz wrote:

As you know, for mkinitcpio not to fail, then you need to mount the pseudo-filesystems first, but as arch-chroot also does that, then I don't know why it fails with it...

I think I can get the mkinitcpio build if I export the locale again (I think the env isn't being passed properly) but I still get hung up on my bootloader install. I think it might be my heredoc getting double escaped (the \\ slashes in the EFI path are a nightmare to keep track of in the terms of how many times they are getting escaped... I'd single quote them but I have some variables in them).

mhertz wrote:

Thanks for your heredocs tip btw... I did knew it, but still hadent used it, dunno why smile

I love heredocs smile


Ethan Schoonover
Precision Colors - http://ethanschoonover.com/solarized

Offline

#7 2012-09-21 04:40:25

altercation
Member
From: Seattle
Registered: 2011-05-15
Posts: 136
Website

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

falconindy wrote:

It'd be nice to actually post those failures... if there's a bug in arch-chroot or room for improvement, I'd like to fix it.

I almost messaged you yesterday on this then figured I should do some more work to make sure I wasn't being dumb about something smile

Let me figure out if I'm screwing up first then I'll submit or offer up a patch if I can narrow down the problem.


Ethan Schoonover
Precision Colors - http://ethanschoonover.com/solarized

Offline

#8 2012-09-21 23:28:37

altercation
Member
From: Seattle
Registered: 2011-05-15
Posts: 136
Website

Re: Minimal Arch install script - EFI/GPT gummiboot with LUKS

I've updated the github repository with a version that is now working, unified, with arch-chroot. The customization section at the end is messy but it should be clear enough how things work.

@falconindy is blameless and I confirmed that, as I suspected, the problems with arch-chroot were entirely of my own making. smile


Ethan Schoonover
Precision Colors - http://ethanschoonover.com/solarized

Offline

Board footer

Powered by FluxBB