Skip to content

71 comments

Reminds me of this classic.

179 points

Holy shit I haven't seen a bash.org link in forever.

60 points

I seldom get a chance to post one. Even then I usually can't find what I wanted to.

3 points

I used to legit do this on my Duron 1200Mhz box.

Save the menuconfig, prepare the most detailed emerge that would make Da Vinci jealous, and then go on a weekend trip only to get back and find it's 50% done.

13 points

Gods below I remember having a Duron 1200. It was a MASSIVE upgrade over the ancient P233 I'd had for like six years.

3 points

Did you run it?

31 points

Yeah it worked just fine, only forgot to enable networking :D

53 points

Haha I was trying to work out what was missing. Got ssh but no connection!

And people say the Ubuntu installer is easy ;)

30 points

Now that you know it works you just need to save it to a script for reuse. The penultimate in laziness.

12 points

What the heck is vda?

18 points

It's a qemu vm, so I guess udev sees that it's a virtual disk and assigns it this way

19 points

Only virtio disk will be named vda. If you choose other type of bus, the virtual disk could be named sda or hda(for scsi disk and ide bus).

5 points

Ahh thanks. Come to think of it I have run into that before, just been a while, heh.

4 points

Soo where is the script as text :))

11 points

Here you go

parted /dev/vda mklabel msdos && parted /dev/vda mkpart primary ext4 0% 100% && mkfs.ext4 /dev/vda1 && mount /dev/vda1 /mnt && pacstrap /mnt base vim sudo grub openssh && genfstab -U -p /mnt >> /mnt/etc/fstab && arch-chroot /mnt bash -c "grub-install --target=i386-pc /dev/vda && grub-mkconfig -o /boot/grub/grub.cfg && useradd -m -g users -G wheel,storage,power sysadmin && passwd && passwd sysadmin && systemctl enable sshd && EDITOR=vim visudo && exit" && reboot

But I really don't suggest to use it, unless you know what you are doing. It's not really the "Arch way" and you might need to change a couple parts in order to get it working.

32 points

Thank you. Of course i am not copy pasting directly, since i don't like using 1 partition. This is just for reminding me the commands i forget :)

7 points

WHAT YOU CAN PACSTRAP INDIVIDUAL PACKAGES

10 points

it will also accept a text file with one package name per line:

pacstrap /mnt - < packages.txt
5 points

Uhm... Of course? Just because you usually append a group like base doesn't mean you can't use it with packages... It works very similar to pacman

3 points

Nice, it really shows just how freaking easy it is to install btw.

6 points

Heck, throw in whiptail and you could probably write yourself a one-liner menu-driven installer!

3 points

Wow this seems so simple and efficient! Have to give this a try soon

2 points

Why visudo? You could do echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel instead, or smth similar.

2 points

Isn't using visudo the best practice?

2 points

For editing sudoers file - yes. But if you edit this file then next pacman update for sudo package will create .pacnew file. If all you need is to add new rule for your user or group, then better practice is to create extra file under sudoers.d folder. These extra files are kind of "appended" to main sudoers config file when its configuration is loaded in memory.

You see this kind of patten for a lot of other configurations - /etc/X11/xorg.conf.d, /etc/ld.so.conf.d, etc...

2 points

Oh, didn't know sudoers.d was a thing. You live and you learn I guess

2 points

So what does this do?

2 points

In short, it installs Arch Linux. Although if you don't know what it does, don't just go and paste this onto a real machine. Some stuff in this is really host specific

1 points

Okay, I know what each of the commands do separately but not as a whole

1 points

would like to know as well. :D just short summary / annotation

1 points

Does the visudo section actually allow sudo to work?

Aren't you also supposed to unmount /mnt before rebooting?

2 points

In this case it opens vim to edit the sudoers file, so a bit of extra work, but it worked just fine. Oh and yes, I forgot to umount.

1 points

Isn't && exit a no-op for bash -c?

2 points

Oops! Didn't really think too much when I was writing this, I was just lazy :D

0 points

Arch don't install dhclient by default, chrooting into it to use internet might not work without dhclient

2 points

Do this with LFS and I'll be applauding goes back to compiling the 70th package..

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.