Kalu: Keeping Arch Linux Up-to-date

Hi all,
Yes, there are already a few “update notifier” out there, but I couldn’t find one that would fit my needs (granted I didn’t search too hard, I was also interested in making my own as a fun exercice…) so I decided to make a new one.
kalu (which could stand for “Keeping Arch Linux Up-to-date”) is a small application that will add an icon to your systray and sit there, regularly checking if there’s anything new for you to upgrade. As soon as it finds something, it’ll show a notification to let you know about it. (In other words, revolutionary. )
What kalu can check for:
- updated packages (A word about this: kalu does not sync your "actual" databases, to avoid potential problems, but instead uses temporary copies of the dbs.)
- updated watched packages (i.e. packages not installed, but for which you still wanna know when there's an update)
- updated AUR packages
- updated watched AUR packages (same as watched ones, but for AUR packages. Who would've guessed?)
- news (from archlinux.org)
(on its tooltip, kalu can also report how many (if any) dbs can be synced)
When system/AUR upgrades are available, notifications can include a button to start the system/AUR upgrades. You can specify the command line to be executed when the button is clicked.
And for the fun of it, it comes with an integrated "system updater," to do what `pacman -Syu` does but in a GTK GUI. Because why not? Also, I wanted one. :-)
The system updater can also execute one (or more) command lines of your choice after a successfull upgrade, and you can use a variable ($PACKAGES) to be replaced by the list of upgraded packages. (Note that the list actually is of all packages involved in the sysupgrade, i.e. also those removed or added, e.g. when a package is replaced by another one.)
If you don't like it/the idea of a graphical system updater, and not using it isn't enough, you can use configure option --disable-updater and turn kalu into a notifier only.
From v1.1.0 onwards, two command line options - --manual-checks (-m) and --auto-checks (-a) - allow to run manual/auto checks from command line. No GUI will be used at all, everything gets printed on stderr/stdout (using the same templates as for notifications).
This can be done without the need for a DISPLAY/running X server (i.e. no GTK init performed), thus works from a tty or through SSH. This can also be useful to use kalu from scripts.
Alongside those options is a configure option (--disable-gui) to make kalu a small CLI-only binary (i.e. no dependency to GTK nor libnotify), which could be useful on GUIless box (e.g. servers), where kalu can then still be used to check for upgrades, watched packages, etc
With v1.2.0 it is now possible to have kalu re-show the last notifications. So if you missed them or forgot what it was about, one click will re-show all notifications instantly without the need to ran the checks again. And, somewhat similarly to what happens after a system upgrade using kalu's updater, you can now use variable $PACKAGES on the command line to perform AUR updates. Can be useful to start some helper/script to handle the update of those packages automatically for you.
Also note that kalu's source code (and issue tracker) has been moved to a git repo (was mercurial before), and is now hosted on github.
Thanks to Painless Rob for his great icons.
Links:
- Slightly more verbose description
- Source code
- PKGBUILD in the AUR
- Complete changelog
Hopefully someone may find it useful.
Cheers,
-jacky
Edit: Added info about recent changes/additions to latest version.
Last edited by jjacky (2012-09-15 11:37:49)

OK - a quick report.
The news does not appear to have a 'mark read' button.
Here is the debug;
[neil@arch ~]$ sudo kalu --debug
[08:34:02] debug mode enabled
[08:34:02] config: attempting to read file /root/.config/kalu/kalu.conf
[08:34:02] config: finished parsing /root/.config/kalu/kalu.conf
[08:34:02] config: attempting to read file /root/.config/kalu/watched.conf
[08:34:02] config: finished parsing /root/.config/kalu/watched.conf
[08:34:02] config: attempting to read file /root/.config/kalu/watched-aur.conf
[08:34:02] config: finished parsing /root/.config/kalu/watched-aur.conf
[08:34:02] config: attempting to read file /root/.config/kalu/news.conf
[08:34:02] config: finished parsing /root/.config/kalu/news.conf
[08:34:04] downloading http://www.archlinux.org/feeds/news/
[08:34:05] downloaded 12335 bytes
[08:34:05] -> Minimum kernel requirement 2.6.32
[08:34:05] -> libpng/libtiff rebuilds move from [testing]
[08:34:05] -> Arch Linux @ FOSDEM 2012
[08:34:05] -> kmod replaces module-init-tools
[08:34:05] -> pacman 4 moves to [core]
[08:34:05] -> Users of unofficial kernels must enable devtmpfs support
[08:34:05] -> filesystem upgrade - manual intervention required
[08:34:05] -> wiki and bbs downtime
[08:34:05] -> initscripts update - manual intervention required
[08:34:05] -> Hostname utility moved from net-tools to inetutils
[08:34:05] parsing pacman.conf (/etc/pacman.conf) for options
[08:34:05] config: attempting to read file /etc/pacman.conf
[08:34:05] config: new section 'options'
[08:34:05] config: SyncFirst: pacman
[08:34:05] config: arch: x86_64
[08:34:05] config: checkspace
[08:34:05] config: SigLevel: Never
[08:34:05] config: new section 'core'
[08:34:05] config file /etc/pacman.conf, line 82: including /etc/pacman.d/mirrorlist
[08:34:05] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:05] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:05] config: new section 'extra'
[08:34:05] config file /etc/pacman.conf, line 86: including /etc/pacman.d/mirrorlist
[08:34:05] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:05] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:05] config: new section 'community'
[08:34:05] config file /etc/pacman.conf, line 94: including /etc/pacman.d/mirrorlist
[08:34:05] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:05] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:05] config: new section 'multilib'
[08:34:05] config file /etc/pacman.conf, line 105: including /etc/pacman.d/mirrorlist
[08:34:05] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:05] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:05] config: new section 'archlinuxfr'
[08:34:05] config: finished parsing /etc/pacman.conf
[08:34:05] setting up libalpm
[08:34:05] creating local db
[08:34:05] created tmp folder /tmp/kalu-YB259V
[08:34:05] created symlink /tmp/kalu-YB259V/local
[08:34:05] created folder /tmp/kalu-YB259V/sync
[08:34:05] copying /var/lib/pacman/sync/multilib.db to /tmp/kalu-YB259V/sync/multilib.db
[08:34:05] ..done
[08:34:05] updated time for /tmp/kalu-YB259V/sync/multilib.db
[08:34:05] copying /var/lib/pacman/sync/archlinuxfr.db to /tmp/kalu-YB259V/sync/archlinuxfr.db
[08:34:05] ..done
[08:34:05] updated time for /tmp/kalu-YB259V/sync/archlinuxfr.db
[08:34:05] copying /var/lib/pacman/sync/extra.db to /tmp/kalu-YB259V/sync/extra.db
[08:34:05] ..done
[08:34:05] updated time for /tmp/kalu-YB259V/sync/extra.db
[08:34:05] copying /var/lib/pacman/sync/community.db to /tmp/kalu-YB259V/sync/community.db
[08:34:05] ..done
[08:34:05] updated time for /tmp/kalu-YB259V/sync/community.db
[08:34:05] copying /var/lib/pacman/sync/core.db to /tmp/kalu-YB259V/sync/core.db
[08:34:05] ..done
[08:34:05] updated time for /tmp/kalu-YB259V/sync/core.db
[08:34:05] register core
[08:34:05] add server http://mir1.archlinux.fr/archlinux/core/os/x86_64 into core
[08:34:05] add server http://archlinux.mirror.dkm.cz/pub/archlinux/core/os/x86_64 into core
[08:34:05] add server http://archlinux.mirror.kangaroot.net/core/os/x86_64 into core
[08:34:05] add server http://ftp.uni-kl.de/pub/linux/archlinux/core/os/x86_64 into core
[08:34:05] add server http://archlinux.mirror.root.lu/core/os/x86_64 into core
[08:34:05] add server http://ftp.halifax.rwth-aachen.de/archlinux/core/os/x86_64 into core
[08:34:05] register extra
[08:34:05] add server http://mir1.archlinux.fr/archlinux/extra/os/x86_64 into extra
[08:34:05] add server http://archlinux.mirror.dkm.cz/pub/archlinux/extra/os/x86_64 into extra
[08:34:05] add server http://archlinux.mirror.kangaroot.net/extra/os/x86_64 into extra
[08:34:05] add server http://ftp.uni-kl.de/pub/linux/archlinux/extra/os/x86_64 into extra
[08:34:05] add server http://archlinux.mirror.root.lu/extra/os/x86_64 into extra
[08:34:05] add server http://ftp.halifax.rwth-aachen.de/archlinux/extra/os/x86_64 into extra
[08:34:05] register community
[08:34:05] add server http://mir1.archlinux.fr/archlinux/community/os/x86_64 into community
[08:34:05] add server http://archlinux.mirror.dkm.cz/pub/archlinux/community/os/x86_64 into community
[08:34:05] add server http://archlinux.mirror.kangaroot.net/community/os/x86_64 into community
[08:34:05] add server http://ftp.uni-kl.de/pub/linux/archlinux/community/os/x86_64 into community
[08:34:05] add server http://archlinux.mirror.root.lu/community/os/x86_64 into community
[08:34:05] add server http://ftp.halifax.rwth-aachen.de/archlinux/community/os/x86_64 into community
[08:34:05] register multilib
[08:34:05] add server http://mir1.archlinux.fr/archlinux/multilib/os/x86_64 into multilib
[08:34:05] add server http://archlinux.mirror.dkm.cz/pub/archlinux/multilib/os/x86_64 into multilib
[08:34:05] add server http://archlinux.mirror.kangaroot.net/multilib/os/x86_64 into multilib
[08:34:05] add server http://ftp.uni-kl.de/pub/linux/archlinux/multilib/os/x86_64 into multilib
[08:34:05] add server http://archlinux.mirror.root.lu/multilib/os/x86_64 into multilib
[08:34:05] add server http://ftp.halifax.rwth-aachen.de/archlinux/multilib/os/x86_64 into multilib
[08:34:05] register archlinuxfr
[08:34:05] add server http://repo.archlinux.fr/x86_64 into archlinuxfr
[08:34:05] core was updated
[08:34:07] extra was updated
[08:34:09] community was updated
[08:34:09] multilib was updated
[08:34:10] archlinuxfr was updated
[08:34:10] -> gdome2 0.8.1-3 -> 0.8.1-4 [dl=106416; ins=942080]
[08:34:10] -> gsm 1.0.13-6 -> 1.0.13-7 [dl=33196; ins=163840]
[08:34:10] -> libcdaudio 0.99.12-5 -> 0.99.12-6 [dl=51152; ins=266240]
[08:34:10] -> libgme 0.6.0-1 -> 0.6.0-2 [dl=117552; ins=348160]
[08:34:10] -> libid3tag 0.15.1b-6 -> 0.15.1b-7 [dl=42820; ins=307200]
[08:34:10] -> libieee1284 0.2.11-3 -> 0.2.11-4 [dl=62344; ins=421888]
[08:34:10] -> libirman 0.4.5-2 -> 0.4.5-3 [dl=12576; ins=69632]
[08:34:10] -> libmodplug 0.8.8.3-1 -> 0.8.8.4-1 [dl=150248; ins=409600]
[08:34:10] -> libofa 0.9.3-3 -> 0.9.3-4 [dl=57572; ins=327680]
[08:34:10] -> libwpg 0.2.0-1 -> 0.2.1-1 [dl=100924; ins=610304]
[08:34:10] -> libzip 0.10-1 -> 0.10-2 [dl=108000; ins=503808]
[08:34:10] -> lsb-release 1.4-10 -> 1.4-11 [dl=6204; ins=53248]
[08:34:10] -> menu-cache 0.3.2-1 -> 0.3.2-2 [dl=47280; ins=188416]
[08:34:10] -> neon 0.29.6-2 -> 0.29.6-3 [dl=182224; ins=1282048]
[08:34:10] -> openbox 3.5.0-4 -> 3.5.0-5 [dl=324440; ins=2306048]
[08:34:10] -> p11-kit 0.9-1 -> 0.11-1 [dl=61216; ins=438272]
[08:34:10] -> perl-encode-locale 1.02-1 -> 1.03-1 [dl=9544; ins=53248]
[08:34:10] -> perl-error 0.17016-2 -> 0.17017-1 [dl=17860; ins=77824]
[08:34:10] -> perl-http-date 6.00-1 -> 6.01-1 [dl=8252; ins=49152]
[08:34:10] -> perl-file-listing 6.03-1 -> 6.04-1 [dl=7300; ins=49152]
[08:34:10] -> perl-html-tagset 3.20-2 -> 3.20-3 [dl=9916; ins=57344]
[08:34:10] -> perl-http-message 6.02-1 -> 6.03-1 [dl=70156; ins=229376]
[08:34:10] -> perl-http-cookies 6.00-1 -> 6.01-1 [dl=19828; ins=90112]
[08:34:10] -> perl-http-negotiate 6.00-1 -> 6.01-1 [dl=11104; ins=57344]
[08:34:10] -> sudo 1.8.3.p2-2 -> 1.8.4-1 [dl=519196; ins=2236416]
[08:34:10] -> taglib 1.7-3 -> 1.7-4 [dl=231812; ins=1265664]
[08:34:10] -> tint2 0.11-4 -> 0.11-5 [dl=89756; ins=417792]
[08:34:10] -> vlc 1.1.13-6 -> 2.0.0-1 [dl=6922380; ins=36552704]
[08:34:10] looking for AUR updates
[08:34:10] downloading http://aur.archlinux.org/rpc.php?type=multiinfo&arg[]=alan-bzr&arg[]=archey&arg[]=archlinux-lxdm-theme&arg[]=conky-lua&arg[]=exaile&arg[]=gnome-menus2&arg[]=graveman&arg[]=gtk-engines-clearlooks-colors&arg[]=i2c-tools&arg[]=kalu&arg[]=openbox-menu&arg[]=pacmanxg4-bin&arg[]=python-xrandr&arg[]=read-edid&arg[]=readahead-fedora&arg[]=toluapp&arg[]=wicked-git&arg[]=wmfs-git&arg[]=xdg-su&arg[]=yapan
[08:34:10] downloaded 7730 bytes
[08:34:10] parsing json
[08:34:10] got 20 results
[08:34:10] pacmanxg4-bin 4.7-2 -> 4.8-1
[08:34:10] -> pacmanxg4-bin 4.7-2 -> 4.8-1 [dl=0; ins=0]
[08:34:10] removing /tmp/kalu-YB259V/sync/archlinuxfr.db success (0)
[08:34:10] removing /tmp/kalu-YB259V/sync/multilib.db success (0)
[08:34:10] removing /tmp/kalu-YB259V/sync/community.db success (0)
[08:34:10] removing /tmp/kalu-YB259V/sync/extra.db success (0)
[08:34:10] removing /tmp/kalu-YB259V/sync/core.db success (0)
[08:34:10] removing /tmp/kalu-YB259V/sync success (0)
[08:34:10] removing /tmp/kalu-YB259V/local success (0)
[08:34:10] removing /tmp/kalu-YB259V success (0)
[08:34:18] config: attempting to read file /etc/pacman.conf
[08:34:18] config: new section 'options'
[08:34:18] config: SyncFirst: pacman
[08:34:18] config: arch: x86_64
[08:34:18] config: checkspace
[08:34:18] config: SigLevel: Never
[08:34:18] config: new section 'core'
[08:34:18] config file /etc/pacman.conf, line 82: including /etc/pacman.d/mirrorlist
[08:34:18] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:18] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:18] config: new section 'extra'
[08:34:18] config file /etc/pacman.conf, line 86: including /etc/pacman.d/mirrorlist
[08:34:18] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:18] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:18] config: new section 'community'
[08:34:18] config file /etc/pacman.conf, line 94: including /etc/pacman.d/mirrorlist
[08:34:18] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:18] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:18] config: new section 'multilib'
[08:34:18] config file /etc/pacman.conf, line 105: including /etc/pacman.d/mirrorlist
[08:34:18] config: attempting to read file /etc/pacman.d/mirrorlist
[08:34:18] config: finished parsing /etc/pacman.d/mirrorlist
[08:34:18] config: new section 'archlinuxfr'
[08:34:18] config: finished parsing /etc/pacman.conf
[08:34:18] [kalu-updater] sender is :1.16 -- client is (null)
[08:34:18] [kalu-updater] client is :1.16
[08:34:18] MethodFinished for method Init
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] getting alpm params
[08:34:18] [kalu-updater] init alpm
[08:34:18] MethodFinished for method InitAlpm
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] add server http://mir1.archlinux.fr/archlinux/core/os/x86_64 into core
[08:34:18] [kalu-updater] add server http://archlinux.mirror.dkm.cz/pub/archlinux/core/os/x86_64 into core
[08:34:18] [kalu-updater] add server http://archlinux.mirror.kangaroot.net/core/os/x86_64 into core
[08:34:18] [kalu-updater] add server http://ftp.uni-kl.de/pub/linux/archlinux/core/os/x86_64 into core
[08:34:18] [kalu-updater] add server http://archlinux.mirror.root.lu/core/os/x86_64 into core
[08:34:18] [kalu-updater] add server http://ftp.halifax.rwth-aachen.de/archlinux/core/os/x86_64 into core
[08:34:18] MethodFinished for method AddDb
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] add server http://mir1.archlinux.fr/archlinux/extra/os/x86_64 into extra
[08:34:18] [kalu-updater] add server http://archlinux.mirror.dkm.cz/pub/archlinux/extra/os/x86_64 into extra
[08:34:18] [kalu-updater] add server http://archlinux.mirror.kangaroot.net/extra/os/x86_64 into extra
[08:34:18] [kalu-updater] add server http://ftp.uni-kl.de/pub/linux/archlinux/extra/os/x86_64 into extra
[08:34:18] [kalu-updater] add server http://archlinux.mirror.root.lu/extra/os/x86_64 into extra
[08:34:18] [kalu-updater] add server http://ftp.halifax.rwth-aachen.de/archlinux/extra/os/x86_64 into extra
[08:34:18] MethodFinished for method AddDb
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] add server http://mir1.archlinux.fr/archlinux/community/os/x86_64 into community
[08:34:18] [kalu-updater] add server http://archlinux.mirror.dkm.cz/pub/archlinux/community/os/x86_64 into community
[08:34:18] [kalu-updater] add server http://archlinux.mirror.kangaroot.net/community/os/x86_64 into community
[08:34:18] [kalu-updater] add server http://ftp.uni-kl.de/pub/linux/archlinux/community/os/x86_64 into community
[08:34:18] [kalu-updater] add server http://archlinux.mirror.root.lu/community/os/x86_64 into community
[08:34:18] [kalu-updater] add server http://ftp.halifax.rwth-aachen.de/archlinux/community/os/x86_64 into community
[08:34:18] MethodFinished for method AddDb
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] add server http://mir1.archlinux.fr/archlinux/multilib/os/x86_64 into multilib
[08:34:18] [kalu-updater] add server http://archlinux.mirror.dkm.cz/pub/archlinux/multilib/os/x86_64 into multilib
[08:34:18] [kalu-updater] add server http://archlinux.mirror.kangaroot.net/multilib/os/x86_64 into multilib
[08:34:18] [kalu-updater] add server http://ftp.uni-kl.de/pub/linux/archlinux/multilib/os/x86_64 into multilib
[08:34:18] [kalu-updater] add server http://archlinux.mirror.root.lu/multilib/os/x86_64 into multilib
[08:34:18] [kalu-updater] add server http://ftp.halifax.rwth-aachen.de/archlinux/multilib/os/x86_64 into multilib
[08:34:18] MethodFinished for method AddDb
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:18] [kalu-updater] add server http://repo.archlinux.fr/x86_64 into archlinuxfr
[08:34:18] MethodFinished for method AddDb
[08:34:18] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:22] MethodFinished for method SyncDbs
[08:34:22] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:27] [kalu-updater] sender is :1.16 -- client is :1.16
[08:34:47] MethodFinished for method SysUpgrade
[08:35:26] downloading http://www.archlinux.org/feeds/news/
[08:35:27] downloaded 12335 bytes
I still have '1 AUR packages updated' on the mouseover...

Similar Messages

  • Arch linux time and date weirdness

    A while back I unplugged my arch linux hard drive for a certain reason, and that froze the time on it, so I had to reset the time when i booted it back up.  Now, whenever I boot up I get an error message about "the last session is in the future" and I can't boot.  I adjusted the bios clock to a few months a ahead and that fixed it, but of course that's not a permanent solution.  because of this time error some secure sites like gmail and my online banking site are inaccessible because of invalid certificates.
    How do i fix this problem?

    k_ibou wrote:
    when you receive that message you will be prompt to enter you root password to solve the problem. And it give you the command.
    So I recommend you:
    1)  to set up the bios with the right date and hour.
    2) boot to archlinux and do as I said above. You must read carefully the text, you will see a comand.
    3) If you have more than one partition if probably that you must do it again for the partition that is set in future. Just copy the command and change / for that you need to repair.
    4) when you boot to your DE do this in console: # date --set "Y/M/D h:m"
    I think with that should be ok, you can check your rc.conf in the option of hardwareclock
    I tried both k_ibou's and Mardoct's solutions and neither worked.  I still get the the "...in the future" error upon booting.  I also tried one other solution, but apparently hwclock is not the same as BIOS clock.  I need to boot into Arch with the CORRECT time in the BIOS, so that I don't get that "future" error when I reboot.  I saw no command outside of "mount -o -n remount,rw /", which doesn't seem to actually do anything.

  • Windows 7 / Arch Linux Dual-Boot - win7 keeps changing the boot flag!

    Greetings!
    Its been a long while since I had to dual-boot with windows on the same machine.
    I 've installed windows 7 and then arch linux and installed GRUB on my sda1 where the /boot partitions is located at.
    I've managed to boot into arch successfully and later into windows also successfully.... but when i tried to boot into arch again I wasn't greeted with the typical GRUB boot screen... grub was ignored completely and win7 booting began as if it was the only OS in my hard drive.
    I've used the gparted live cd and realized that the boot flag has changed from my /boot partition (sda1) to my windows partition (sda2). I've changed it back and I was able to boot into arch again. but when I rebooted to win7 and then to arch the same thing has happened. The boot flag keeps changing whenever im rebooting into windows making impossible for me to boot with GRUB unles I manually change the flag again.
    I haven't installed GRUB into the MBR because I hear  it is a bad practice when you have a windows OS also installed (something with service packs not being able to install, among other things). I also don't want to use the easyBCD method to boot arch using the win7 loader.
    here is the partition scheme on my 500gb sata drive :
    /dev/sda1      /boot                 250mb    (primary)
    /dev/sda2      windows 7 ntfs   100gb     (primary)
    /dev/sda3      swap                  4gb        (primary)
    /dev/sda5     /                       16gb        (logical)
    /dev/sda6     /var                   8gb         (logical)
    /dev/sda7     /home               the rest of the hd space   (logical)
    What am I doing wrong and how do i prevent the boot flag from changing?
    Thanks in advance for any help you can give me!
    Last edited by kamigr (2010-01-12 14:35:07)

    naequs wrote:
    bumping this because i have the EXACT same problem !
    however i installed grub to sda1 because i didnt want my installs to mess with each other  (not that ive had any problems with grub in mbr though...) .
    this just looked cleaner to me.
    if anyone has figured out how to prevent windows from automagically changing the bootgflag, id like to know !
    but maybe this is a question more suitable for a windoze forum
    tia
    /edit: seriously, ive been searching the net for some time now, including irc chans and there seems to be no solution to this ! all threads similar to this just end dead !
    i hate how windows claims to own my computer!
    1. don't necrobump
    2. as mentioned in the thread, just install grub to mbr and chainload windows. It works just fine and is the easiest way to get it working reliable.

  • System encryption using LUKS and GPG encrypted keys for arch linux

    Update: As of 2012-03-28, arch changed from gnupg 1.4 to 2.x which uses pinentry for the password dialog. The "etwo" hook described here doesn't work with gnupg 2. Either use the openssl hook below or use a statically compiled version of gnupg 1.4.
    Update: As of 2012-12-19, the mkinitcpio is not called during boot, unless the "install" file for the hook contains "add_runscript". This resulted in an unbootable system for me. Also, the method name was changed from install () to build ().
    Update: 2013-01-13: Updated the hook files using the corrections by Deth.
    Note: This guide is a bit dated now, in particular the arch installation might be different now. But essentially, the approach stays the same. Please also take a look at the posts further down, specifically the alternative hooks that use openssl.
    I always wanted to set up a fully encrypted arch linux server that uses gpg encrypted keyfiles on an external usb stick and luks for root filesystem encryption. I already did it once in gentoo using this guide. For arch, I had to play alot with initcpio hooks and after one day of experimentation, I finally got it working. I wrote a little guide for myself which I'm going to share here for anyone that might be interested. There might be better or easier ways, like I said this is just how I did it. I hope it might help someone else. Constructive feedback is always welcome
    Intro
    Using arch linux mkinitcpio's encrypt hook, one can easily use encrypted root partitions with LUKS. It's also possible to use key files stored on an external drive, like an usb stick. However, if someone steals your usb stick, he can just copy the key and potentially access the system. I wanted to have a little extra security by additionally encrypting the key file with gpg using a symmetric cipher and a passphrase.
    Since the encrypt hook doesn't support this scenario, I created a modifed hook called “etwo” (silly name I know, it was the first thing that came to my mind). It will simply look if the key file has the extension .gpg and, if yes, use gpg to decrypt it, then pipe the result into cryptsetup.
    Conventions
    In this short guide, I use the following disk/partition names:
    /dev/sda: is the hard disk that will contain an encrypted swap (/dev/sda1), /var (/dev/sda2) and root (/dev/sda3) partition.
    /dev/sdb is the usb stick that will contain the gpg encrypted luks keys, the kernel and grub. It will have one partition /dev/sdb1 formatted with ext2.
    /dev/mapper/root, /dev/mapper/swap and /dev/mapper/var will be the encrypted devices.
    Credits
    Thanks to the authors of SECURITY_System_Encryption_DM-Crypt_with_LUKS (gentoo wiki), System Encryption with LUKS (arch wiki), mkinitcpio (arch wiki) and Early Userspace in Arch Linux (/dev/brain0 blog)!
    Guide
    1. Boot the arch live cd
    I had to use a newer testing version, because the 2010.05 cd came with a broken gpg. You can download one here: http://releng.archlinux.org/isos/. I chose the “core“ version. Go ahead and boot the live cd, but don't start the setup yet.
    2. Set keymap
    Use km to set your keymap. This is important for non-qwerty keyboards to avoid suprises with passphrases...
    3. Wipe your discs
    ATTENTION: this will DELETE everything on /dev/sda and /dev/sdb forever! Do not blame me for any lost data!
    Before encrypting the hard disc, it has to be completely wiped and overwritten with random data. I used shred for this. Others use badblocks or dd with /dev/urandom. Either way, this will take a long time, depending on the size of your disc. I also wiped my usb stick just to be sure.
    shred -v /dev/sda
    shred -v /dev/sdb
    4. Partitioning
    Fire up fdisk and create the following partitions:
    /dev/sda1, type linux swap.
    /dev/sda2: type linux
    /dev/sda3: type linux
    /dev/sdb1, type linux
    Of course you can choose a different layout, this is just how I did it. Keep in mind that only the root filesystem will be decrypted by the initcpio. The rest will be decypted during normal init boot using /etc/crypttab, the keys being somewhere on the root filesystem.
    5. Format  and mount the usb stick
    Create an ext2 filesystem on /dev/sdb1:
    mkfs.ext2 /dev/sdb1
    mkdir /root/usb
    mount /dev/sdb1 /root/usb
    cd /root/usb # this will be our working directory for now.
    Do not mount anything to /mnt, because the arch installer will use that directory later to mount the encrypted root filesystem.
    6. Configure the network (if not already done automatically)
    ifconfig eth0 192.168.0.2 netmask 255.255.255.0
    route add default gw 192.168.0.1
    echo "nameserver 192.168.0.1" >> /etc/resolv.conf
    (this is just an example, your mileage may vary)
    7. Install gnupg
    pacman -Sy
    pacman -S gnupg
    Verify that gnupg works by launching gpg.
    8. Create the keys
    Just to be sure, make sure swap is off:
    cat /proc/swaps
    should return no entries.
    Create gpg encrypted keys (remember, we're still in our working dir /root/usb):
    dd if=/dev/urandom bs=512 count=4 | gpg -v --cipher-algo aes256 --digest-algo sha512 -c -a > root.gpg
    dd if=/dev/urandom bs=512 count=4 | gpg -v --cipher-algo aes256 --digest-algo sha512 -c -a > var.gpg
    Choose a strong password!!
    Don't do this in two steps, e.g don't do dd to a file and then gpg on that file. The key should never be stored in plain text on an unencrypted device, except if that device is wiped on system restart (ramfs)!
    Note that the default cipher for gpg is cast5, I just chose to use a different one.
    9. Create the encrypted devices with cryptsetup
    Create encrypted swap:
    cryptsetup -c aes-cbc-essiv:sha256 -s 256 -h whirlpool -d /dev/urandom create swap /dev/sda1
    You should see /dev/mapper/swap now. Don't format nor turn it on for now. This will be done by the arch installer.
    Important: From the Cryptsetup 1.1.2 Release notes:
    Cryptsetup can accept passphrase on stdin (standard input). Handling of new line (\n) character is defined by input specification:
        if keyfile is specified as "-" (using --key-file=- or by positional argument in luksFormat and luksAddKey, like cat file | cryptsetup --key-file=- <action> ), input is processed
          as normal binary file and no new line is interpreted.
        if there is no key file specification (with default input from stdin pipe like echo passphrase | cryptsetup <action> ) input is processed as input from terminal, reading will
          stop after new line is detected.
    If I understand this correctly, since the randomly generated key can contain a newline early on, piping the key into cryptsetup without specifying --key-file=- could result in a big part of the key to be ignored by cryptsetup. Example: if the random key was "foo\nandsomemorebaratheendofthekey", piping it directly into cryptsetup without --key-file=- would result in cryptsetup using only "foo" as key which would have big security implications. We should therefor ALWAYS pipe the key into cryptsetup using --key-file=- which ignores newlines.
    gpg -q -d root.gpg 2>/dev/null | cryptsetup -v -–key-file=- -c aes-cbc-essiv:sha256 -s 256 -h whirlpool luksFormat /dev/sda3
    gpg -q -d var.gpg 2>/dev/null | cryptsetup -v –-key-file=- -c aes-cbc-essiv:sha256 -s 256 -h whirlpool -v luksFormat /dev/sda2
    Check for any errors.
    10. Open the luks devices
    gpg -d root.gpg 2>/dev/null | cryptsetup -v –-key-file=- luksOpen /dev/sda3 root
    gpg -d var.gpg 2>/dev/null | cryptsetup -v –-key-file=- luksOpen /dev/sda2 var
    If you see /dev/mapper/root and /dev/mapper/var now, everything is ok.
    11. Start the installer /arch/setup
    Follow steps 1 to 3.
    At step 4 (Prepare hard drive(s), select “3 – Manually Configure block devices, filesystems and mountpoints. Choose /dev/sdb1 (the usb stick) as /boot, /dev/mapper/swap for swap, /dev/mapper/root for / and /dev/mapper/var for /var.
    Format all drives (choose “yes” when asked “do you want to have this filesystem (re)created”) EXCEPT for /dev/sdb1, choose “no”. Choose the correct filesystem for /dev/sdb1, ext2 in my case. Use swap for /dev/mapper/swap. For the rest, I chose ext4.
    Select DONE to start formatting.
    At step 5 (Select packages), select grub as boot loader. Select the base group. Add mkinitcpio.
    Start step 6 (Install packages).
    Go to step 7 (Configure System).
    By sure to set the correct KEYMAP, LOCALE and TIMEZONE in /etc/rc.conf.
    Edit /etc/fstab:
    /dev/mapper/root / ext4 defaults 0 1
    /dev/mapper/swap swap swap defaults 0 0
    /dev/mapper/var /var ext4 defaults 0 1
    # /dev/sdb1 /boot ext2 defaults 0 1
    Configure the rest normally. When you're done, setup will launch mkinitcpio. We'll manually launch this again later.
    Go to step 8 (install boot loader).
    Be sure to change the kernel line in menu.lst:
    kernel /vmlinuz26 root=/dev/mapper/root cryptdevice=/dev/sda3:root cryptkey=/dev/sdb1:ext2:/root.gpg
    Don't forget the :root suffix in cryptdevice!
    Also, my root line was set to (hd1,0). Had to change that to
    root (hd0,0)
    Install grub to /dev/sdb (the usb stick).
    Now, we can exit the installer.
    12. Install mkinitcpio with the etwo hook.
    Create /mnt/lib/initcpio/hooks/etwo:
    #!/usr/bin/ash
    run_hook() {
    /sbin/modprobe -a -q dm-crypt >/dev/null 2>&1
    if [ -e "/sys/class/misc/device-mapper" ]; then
    if [ ! -e "/dev/mapper/control" ]; then
    /bin/mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
    fi
    [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
    # Get keyfile if specified
    ckeyfile="/crypto_keyfile"
    usegpg="n"
    if [ "x${cryptkey}" != "x" ]; then
    ckdev="$(echo "${cryptkey}" | cut -d: -f1)"
    ckarg1="$(echo "${cryptkey}" | cut -d: -f2)"
    ckarg2="$(echo "${cryptkey}" | cut -d: -f3)"
    if poll_device "${ckdev}" ${rootdelay}; then
    case ${ckarg1} in
    *[!0-9]*)
    # Use a file on the device
    # ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
    if [ "${ckarg2#*.}" = "gpg" ]; then
    ckeyfile="${ckeyfile}.gpg"
    usegpg="y"
    fi
    mkdir /ckey
    mount -r -t ${ckarg1} ${ckdev} /ckey
    dd if=/ckey/${ckarg2} of=${ckeyfile} >/dev/null 2>&1
    umount /ckey
    # Read raw data from the block device
    # ckarg1 is numeric: ckarg1=offset, ckarg2=length
    dd if=${ckdev} of=${ckeyfile} bs=1 skip=${ckarg1} count=${ckarg2} >/dev/null 2>&1
    esac
    fi
    [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
    fi
    if [ -n "${cryptdevice}" ]; then
    DEPRECATED_CRYPT=0
    cryptdev="$(echo "${cryptdevice}" | cut -d: -f1)"
    cryptname="$(echo "${cryptdevice}" | cut -d: -f2)"
    else
    DEPRECATED_CRYPT=1
    cryptdev="${root}"
    cryptname="root"
    fi
    warn_deprecated() {
    echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
    echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
    if poll_device "${cryptdev}" ${rootdelay}; then
    if /sbin/cryptsetup isLuks ${cryptdev} >/dev/null 2>&1; then
    [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
    dopassphrase=1
    # If keyfile exists, try to use that
    if [ -f ${ckeyfile} ]; then
    if [ "${usegpg}" = "y" ]; then
    # gpg tty fixup
    if [ -e /dev/tty ]; then mv /dev/tty /dev/tty.backup; fi
    cp -a /dev/console /dev/tty
    while [ ! -e /dev/mapper/${cryptname} ];
    do
    sleep 2
    /usr/bin/gpg -d "${ckeyfile}" 2>/dev/null | cryptsetup --key-file=- luksOpen ${cryptdev} ${cryptname} ${CSQUIET}
    dopassphrase=0
    done
    rm /dev/tty
    if [ -e /dev/tty.backup ]; then mv /dev/tty.backup /dev/tty; fi
    else
    if eval /sbin/cryptsetup --key-file ${ckeyfile} luksOpen ${cryptdev} ${cryptname} ${CSQUIET}; then
    dopassphrase=0
    else
    echo "Invalid keyfile. Reverting to passphrase."
    fi
    fi
    fi
    # Ask for a passphrase
    if [ ${dopassphrase} -gt 0 ]; then
    echo ""
    echo "A password is required to access the ${cryptname} volume:"
    #loop until we get a real password
    while ! eval /sbin/cryptsetup luksOpen ${cryptdev} ${cryptname} ${CSQUIET}; do
    sleep 2;
    done
    fi
    if [ -e "/dev/mapper/${cryptname}" ]; then
    if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
    export root="/dev/mapper/root"
    fi
    else
    err "Password succeeded, but ${cryptname} creation failed, aborting..."
    exit 1
    fi
    elif [ -n "${crypto}" ]; then
    [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
    msg "Non-LUKS encrypted device found..."
    if [ $# -ne 5 ]; then
    err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
    err "Non-LUKS decryption not attempted..."
    return 1
    fi
    exe="/sbin/cryptsetup create ${cryptname} ${cryptdev}"
    tmp=$(echo "${crypto}" | cut -d: -f1)
    [ -n "${tmp}" ] && exe="${exe} --hash \"${tmp}\""
    tmp=$(echo "${crypto}" | cut -d: -f2)
    [ -n "${tmp}" ] && exe="${exe} --cipher \"${tmp}\""
    tmp=$(echo "${crypto}" | cut -d: -f3)
    [ -n "${tmp}" ] && exe="${exe} --key-size \"${tmp}\""
    tmp=$(echo "${crypto}" | cut -d: -f4)
    [ -n "${tmp}" ] && exe="${exe} --offset \"${tmp}\""
    tmp=$(echo "${crypto}" | cut -d: -f5)
    [ -n "${tmp}" ] && exe="${exe} --skip \"${tmp}\""
    if [ -f ${ckeyfile} ]; then
    exe="${exe} --key-file ${ckeyfile}"
    else
    exe="${exe} --verify-passphrase"
    echo ""
    echo "A password is required to access the ${cryptname} volume:"
    fi
    eval "${exe} ${CSQUIET}"
    if [ $? -ne 0 ]; then
    err "Non-LUKS device decryption failed. verify format: "
    err " crypto=hash:cipher:keysize:offset:skip"
    exit 1
    fi
    if [ -e "/dev/mapper/${cryptname}" ]; then
    if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
    export root="/dev/mapper/root"
    fi
    else
    err "Password succeeded, but ${cryptname} creation failed, aborting..."
    exit 1
    fi
    else
    err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
    fi
    fi
    rm -f ${ckeyfile}
    fi
    Create /mnt/lib/initcpio/install/etwo:
    #!/bin/bash
    build() {
    local mod
    add_module dm-crypt
    if [[ $CRYPTO_MODULES ]]; then
    for mod in $CRYPTO_MODULES; do
    add_module "$mod"
    done
    else
    add_all_modules '/crypto/'
    fi
    add_dir "/dev/mapper"
    add_binary "cryptsetup"
    add_binary "dmsetup"
    add_binary "/usr/bin/gpg"
    add_file "/usr/lib/udev/rules.d/10-dm.rules"
    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
    add_runscript
    help ()
    cat<<HELPEOF
    This hook allows for an encrypted root device with support for gpg encrypted key files.
    To use gpg, the key file must have the extension .gpg and you have to install gpg and add /usr/bin/gpg
    to your BINARIES var in /etc/mkinitcpio.conf.
    HELPEOF
    Edit /mnt/etc/mkinitcpio.conf (only relevant sections displayed):
    MODULES=”ext2 ext4” # not sure if this is really nessecary.
    BINARIES=”/usr/bin/gpg” # this could probably be done in install/etwo...
    HOOKS=”base udev usbinput keymap autodetect pata scsi sata usb etwo filesystems” # (usbinput is only needed if you have an usb keyboard)
    Copy the initcpio stuff over to the live cd:
    cp /mnt/lib/initcpio/hooks/etwo /lib/initcpio/hooks/
    cp /mnt/lib/initcpio/install/etwo /lib/initcpio/install/
    cp /mnt/etc/mkinitcpio.conf /etc/
    Verify your LOCALE, KEYMAP and TIMEZONE in /etc/rc.conf!
    Now reinstall the initcpio:
    mkinitcpio -g /mnt/boot/kernel26.img
    Make sure there were no errors and that all hooks were included.
    13. Decrypt the "var" key to the encrypted root
    mkdir /mnt/keys
    chmod 500 /mnt/keys
    gpg –output /mnt/keys/var -d /mnt/boot/var.gpg
    chmod 400 /mnt/keys/var
    14. Setup crypttab
    Edit /mnt/etc/crypttab:
    swap /dev/sda1 SWAP -c aes-cbc-essiv:sha256 -s 256 -h whirlpool
    var /dev/sda2 /keys/var
    15. Reboot
    We're done, you may reboot. Make sure you select the usb stick as the boot device in your bios and hope for the best. . If it didn't work, play with grub's settings or boot from the live cd, mount your encrypted devices and check all settings. You might also have less trouble by using uuid's instead of device names.  I chose device names to keep things as simple as possible, even though it's not the optimal way to do it.
    Make backups of your data and your usb stick and do not forget your password(s)! Or you can say goodbye to your data forever...
    Last edited by fabriceb (2013-01-15 22:36:23)

    I'm trying to run my install script that is based on https://bbs.archlinux.org/viewtopic.php?id=129885
    Decrypting the gpg key after grub works, but then "Devce root already exists." appears every second.
    any idea ?
    #!/bin/bash
    # This script is designed to be run in conjunction with a UEFI boot using Archboot intall media.
    # prereqs:
    # EFI "BIOS" set to boot *only* from EFI
    # successful EFI boot of Archboot USB
    # mount /dev/sdb1 /src
    set -o nounset
    #set -o errexit
    # Host specific configuration
    # this whole script needs to be customized, particularly disk partitions
    # and configuration, but this section contains global variables that
    # are used during the system configuration phase for convenience
    HOSTNAME=daniel
    USERNAME=user
    # Globals
    # We don't need to set these here but they are used repeatedly throughout
    # so it makes sense to reuse them and allow an easy, one-time change if we
    # need to alter values such as the install target mount point.
    INSTALL_TARGET="/install"
    HR="--------------------------------------------------------------------------------"
    PACMAN="pacman --noconfirm --config /tmp/pacman.conf"
    TARGET_PACMAN="pacman --noconfirm --config /tmp/pacman.conf -r ${INSTALL_TARGET}"
    CHROOT_PACMAN="pacman --noconfirm --cachedir /var/cache/pacman/pkg --config /tmp/pacman.conf -r ${INSTALL_TARGET}"
    FILE_URL="file:///packages/core-$(uname -m)/pkg"
    FTP_URL='ftp://mirrors.kernel.org/archlinux/$repo/os/$arch'
    HTTP_URL='http://mirrors.kernel.org/archlinux/$repo/os/$arch'
    # Functions
    # I've avoided using functions in this script as they aren't required and
    # I think it's more of a learning tool if you see the step-by-step
    # procedures even with minor duplciations along the way, but I feel that
    # these functions clarify the particular steps of setting values in config
    # files.
    SetValue () {
    # EXAMPLE: SetValue VARIABLENAME '\"Quoted Value\"' /file/path
    VALUENAME="$1" NEWVALUE="$2" FILEPATH="$3"
    sed -i "s+^#\?\(${VALUENAME}\)=.*$+\1=${NEWVALUE}+" "${FILEPATH}"
    CommentOutValue () {
    VALUENAME="$1" FILEPATH="$2"
    sed -i "s/^\(${VALUENAME}.*\)$/#\1/" "${FILEPATH}"
    UncommentValue () {
    VALUENAME="$1" FILEPATH="$2"
    sed -i "s/^#\(${VALUENAME}.*\)$/\1/" "${FILEPATH}"
    # Initialize
    # Warn the user about impending doom, set up the network on eth0, mount
    # the squashfs images (Archboot does this normally, we're just filling in
    # the gaps resulting from the fact that we're doing a simple scripted
    # install). We also create a temporary pacman.conf that looks for packages
    # locally first before sourcing them from the network. It would be better
    # to do either *all* local or *all* network but we can't for two reasons.
    # 1. The Archboot installation image might have an out of date kernel
    # (currently the case) which results in problems when chrooting
    # into the install mount point to modprobe efivars. So we use the
    # package snapshot on the Archboot media to ensure our kernel is
    # the same as the one we booted with.
    # 2. Ideally we'd source all local then, but some critical items,
    # notably grub2-efi variants, aren't yet on the Archboot media.
    # Warn
    timer=9
    echo -e "\n\nMAC WARNING: This script is not designed for APPLE MAC installs and will potentially misconfigure boot to your existing OS X installation. STOP NOW IF YOU ARE ON A MAC.\n\n"
    echo -n "GENERAL WARNING: This procedure will completely format /dev/sda. Please cancel with ctrl-c to cancel within $timer seconds..."
    while [[ $timer -gt 0 ]]
    do
    sleep 1
    let timer-=1
    echo -en "$timer seconds..."
    done
    echo "STARTING"
    # Get Network
    echo -n "Waiting for network address.."
    #dhclient eth0
    dhcpcd -p eth0
    echo -n "Network address acquired."
    # Mount packages squashfs images
    umount "/packages/core-$(uname -m)"
    umount "/packages/core-any"
    rm -rf "/packages/core-$(uname -m)"
    rm -rf "/packages/core-any"
    mkdir -p "/packages/core-$(uname -m)"
    mkdir -p "/packages/core-any"
    modprobe -q loop
    modprobe -q squashfs
    mount -o ro,loop -t squashfs "/src/packages/archboot_packages_$(uname -m).squashfs" "/packages/core-$(uname -m)"
    mount -o ro,loop -t squashfs "/src/packages/archboot_packages_any.squashfs" "/packages/core-any"
    # Create temporary pacman.conf file
    cat << PACMANEOF > /tmp/pacman.conf
    [options]
    Architecture = auto
    CacheDir = ${INSTALL_TARGET}/var/cache/pacman/pkg
    CacheDir = /packages/core-$(uname -m)/pkg
    CacheDir = /packages/core-any/pkg
    [core]
    Server = ${FILE_URL}
    Server = ${FTP_URL}
    Server = ${HTTP_URL}
    [extra]
    Server = ${FILE_URL}
    Server = ${FTP_URL}
    Server = ${HTTP_URL}
    #Uncomment to enable pacman -Sy yaourt
    [archlinuxfr]
    Server = http://repo.archlinux.fr/\$arch
    PACMANEOF
    # Prepare pacman
    [[ ! -d "${INSTALL_TARGET}/var/cache/pacman/pkg" ]] && mkdir -m 755 -p "${INSTALL_TARGET}/var/cache/pacman/pkg"
    [[ ! -d "${INSTALL_TARGET}/var/lib/pacman" ]] && mkdir -m 755 -p "${INSTALL_TARGET}/var/lib/pacman"
    ${PACMAN} -Sy
    ${TARGET_PACMAN} -Sy
    # Install prereqs from network (not on archboot media)
    echo -e "\nInstalling prereqs...\n$HR"
    #sed -i "s/^#S/S/" /etc/pacman.d/mirrorlist # Uncomment all Server lines
    UncommentValue S /etc/pacman.d/mirrorlist # Uncomment all Server lines
    ${PACMAN} --noconfirm -Sy gptfdisk btrfs-progs-unstable libusb-compat gnupg
    # Configure Host
    # Here we create three partitions:
    # 1. efi and /boot (one partition does double duty)
    # 2. swap
    # 3. our encrypted root
    # Note that all of these are on a GUID partition table scheme. This proves
    # to be quite clean and simple since we're not doing anything with MBR
    # boot partitions and the like.
    echo -e "format\n"
    # shred -v /dev/sda
    # disk prep
    sgdisk -Z /dev/sda # zap all on disk
    #sgdisk -Z /dev/mmcb1k0 # zap all on sdcard
    sgdisk -a 2048 -o /dev/sda # new gpt disk 2048 alignment
    #sgdisk -a 2048 -o /dev/mmcb1k0
    # create partitions
    sgdisk -n 1:0:+200M /dev/sda # partition 1 (UEFI BOOT), default start block, 200MB
    sgdisk -n 2:0:+4G /dev/sda # partition 2 (SWAP), default start block, 200MB
    sgdisk -n 3:0:0 /dev/sda # partition 3, (LUKS), default start, remaining space
    #sgdisk -n 1:0:1800M /dev/mmcb1k0 # root.gpg
    # set partition types
    sgdisk -t 1:ef00 /dev/sda
    sgdisk -t 2:8200 /dev/sda
    sgdisk -t 3:8300 /dev/sda
    #sgdisk -t 1:0700 /dev/mmcb1k0
    # label partitions
    sgdisk -c 1:"UEFI Boot" /dev/sda
    sgdisk -c 2:"Swap" /dev/sda
    sgdisk -c 3:"LUKS" /dev/sda
    #sgdisk -c 1:"Key" /dev/mmcb1k0
    echo -e "create gpg file\n"
    # create gpg file
    dd if=/dev/urandom bs=512 count=4 | gpg -v --cipher-algo aes256 --digest-algo sha512 -c -a > /root/root.gpg
    echo -e "format LUKS on root\n"
    # format LUKS on root
    gpg -q -d /root/root.gpg 2>/dev/null | cryptsetup -v --key-file=- -c aes-xts-plain -s 512 --hash sha512 luksFormat /dev/sda3
    echo -e "open LUKS on root\n"
    gpg -d /root/root.gpg 2>/dev/null | cryptsetup -v --key-file=- luksOpen /dev/sda3 root
    # NOTE: make sure to add dm_crypt and aes_i586 to MODULES in rc.conf
    # NOTE2: actually this isn't required since we're mounting an encrypted root and grub2/initramfs handles this before we even get to rc.conf
    # make filesystems
    # following swap related commands not used now that we're encrypting our swap partition
    #mkswap /dev/sda2
    #swapon /dev/sda2
    #mkfs.ext4 /dev/sda3 # this is where we'd create an unencrypted root partition, but we're using luks instead
    echo -e "\nCreating Filesystems...\n$HR"
    # make filesystems
    mkfs.ext4 /dev/mapper/root
    mkfs.vfat -F32 /dev/sda1
    #mkfs.vfat -F32 /dev/mmcb1k0p1
    echo -e "mount targets\n"
    # mount target
    #mount /dev/sda3 ${INSTALL_TARGET} # this is where we'd mount the unencrypted root partition
    mount /dev/mapper/root ${INSTALL_TARGET}
    # mount target
    mkdir ${INSTALL_TARGET}
    # mkdir ${INSTALL_TARGET}/key
    # mount -t vfat /dev/mmcb1k0p1 ${INSTALL_TARGET}/key
    mkdir ${INSTALL_TARGET}/boot
    mount -t vfat /dev/sda1 ${INSTALL_TARGET}/boot
    # Install base, necessary utilities
    mkdir -p ${INSTALL_TARGET}/var/lib/pacman
    ${TARGET_PACMAN} -Sy
    ${TARGET_PACMAN} -Su base
    # curl could be installed later but we want it ready for rankmirrors
    ${TARGET_PACMAN} -S curl
    ${TARGET_PACMAN} -S libusb-compat gnupg
    ${TARGET_PACMAN} -R grub
    rm -rf ${INSTALL_TARGET}/boot/grub
    ${TARGET_PACMAN} -S grub2-efi-x86_64
    # Configure new system
    SetValue HOSTNAME ${HOSTNAME} ${INSTALL_TARGET}/etc/rc.conf
    sed -i "s/^\(127\.0\.0\.1.*\)$/\1 ${HOSTNAME}/" ${INSTALL_TARGET}/etc/hosts
    SetValue CONSOLEFONT Lat2-Terminus16 ${INSTALL_TARGET}/etc/rc.conf
    #following replaced due to netcfg
    #SetValue interface eth0 ${INSTALL_TARGET}/etc/rc.conf
    # write fstab
    # You can use UUID's or whatever you want here, of course. This is just
    # the simplest approach and as long as your drives aren't changing values
    # randomly it should work fine.
    cat > ${INSTALL_TARGET}/etc/fstab <<FSTAB_EOF
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    /dev/sda1 /boot vfat defaults 0 0
    /dev/mapper/cryptswap none swap defaults 0 0
    /dev/mapper/root / ext4 defaults,noatime 0 1
    FSTAB_EOF
    # write etwo
    mkdir -p /lib/initcpio/hooks/
    mkdir -p /lib/initcpio/install/
    cp /src/etwo_hooks /lib/initcpio/hooks/etwo
    cp /src/etwo_install /lib/initcpio/install/etwo
    mkdir -p ${INSTALL_TARGET}/lib/initcpio/hooks/
    mkdir -p ${INSTALL_TARGET}/lib/initcpio/install/
    cp /src/etwo_hooks ${INSTALL_TARGET}/lib/initcpio/hooks/etwo
    cp /src/etwo_install ${INSTALL_TARGET}/lib/initcpio/install/etwo
    # write crypttab
    # encrypted swap (random passphrase on boot)
    echo cryptswap /dev/sda2 SWAP "-c aes-xts-plain -h whirlpool -s 512" >> ${INSTALL_TARGET}/etc/crypttab
    # copy configs we want to carry over to target from install environment
    mv ${INSTALL_TARGET}/etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf.orig
    cp /etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf
    mkdir -p ${INSTALL_TARGET}/tmp
    cp /tmp/pacman.conf ${INSTALL_TARGET}/tmp/pacman.conf
    # mount proc, sys, dev in install root
    mount -t proc proc ${INSTALL_TARGET}/proc
    mount -t sysfs sys ${INSTALL_TARGET}/sys
    mount -o bind /dev ${INSTALL_TARGET}/dev
    echo -e "umount boot\n"
    # we have to remount /boot from inside the chroot
    umount ${INSTALL_TARGET}/boot
    # Create install_efi script (to be run *after* chroot /install)
    touch ${INSTALL_TARGET}/install_efi
    chmod a+x ${INSTALL_TARGET}/install_efi
    cat > ${INSTALL_TARGET}/install_efi <<EFI_EOF
    # functions (these could be a library, but why overcomplicate things
    SetValue () { VALUENAME="\$1" NEWVALUE="\$2" FILEPATH="\$3"; sed -i "s+^#\?\(\${VALUENAME}\)=.*\$+\1=\${NEWVALUE}+" "\${FILEPATH}"; }
    CommentOutValue () { VALUENAME="\$1" FILEPATH="\$2"; sed -i "s/^\(\${VALUENAME}.*\)\$/#\1/" "\${FILEPATH}"; }
    UncommentValue () { VALUENAME="\$1" FILEPATH="\$2"; sed -i "s/^#\(\${VALUENAME}.*\)\$/\1/" "\${FILEPATH}"; }
    echo -e "mount boot\n"
    # remount here or grub et al gets confused
    mount -t vfat /dev/sda1 /boot
    # mkinitcpio
    # NOTE: intel_agp drm and i915 for intel graphics
    SetValue MODULES '\\"dm_mod dm_crypt aes_x86_64 ext2 ext4 vfat intel_agp drm i915\\"' /etc/mkinitcpio.conf
    SetValue HOOKS '\\"base udev pata scsi sata usb usbinput keymap consolefont etwo encrypt filesystems\\"' /etc/mkinitcpio.conf
    SetValue BINARIES '\\"/usr/bin/gpg\\"' /etc/mkinitcpio.conf
    mkinitcpio -p linux
    # kernel modules for EFI install
    modprobe efivars
    modprobe dm-mod
    # locale-gen
    UncommentValue de_AT /etc/locale.gen
    locale-gen
    # install and configure grub2
    # did this above
    #${CHROOT_PACMAN} -Sy
    #${CHROOT_PACMAN} -R grub
    #rm -rf /boot/grub
    #${CHROOT_PACMAN} -S grub2-efi-x86_64
    # you can be surprisingly sloppy with the root value you give grub2 as a kernel option and
    # even omit the cryptdevice altogether, though it will wag a finger at you for using
    # a deprecated syntax, so we're using the correct form here
    # NOTE: take out i915.modeset=1 unless you are on intel graphics
    SetValue GRUB_CMDLINE_LINUX '\\"cryptdevice=/dev/sda3:root cryptkey=/dev/sda1:vfat:/root.gpg add_efi_memmap i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 pcie_aspm=force quiet\\"' /etc/default/grub
    # set output to graphical
    SetValue GRUB_TERMINAL_OUTPUT gfxterm /etc/default/grub
    SetValue GRUB_GFXMODE 960x600x32,auto /etc/default/grub
    SetValue GRUB_GFXPAYLOAD_LINUX keep /etc/default/grub # comment out this value if text only mode
    # install the actual grub2. Note that despite our --boot-directory option we will still need to move
    # the grub directory to /boot/grub during grub-mkconfig operations until grub2 gets patched (see below)
    grub_efi_x86_64-install --bootloader-id=grub --no-floppy --recheck
    # create our EFI boot entry
    # bug in the HP bios firmware (F.08)
    efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "ARCH LINUX" --loader "\\\\grub\\\\grub.efi"
    # copy font for grub2
    cp /usr/share/grub/unicode.pf2 /boot/grub
    # generate config file
    grub-mkconfig -o /boot/grub/grub.cfg
    exit
    EFI_EOF
    # Install EFI using script inside chroot
    chroot ${INSTALL_TARGET} /install_efi
    rm ${INSTALL_TARGET}/install_efi
    # Post install steps
    # anything you want to do post install. run the script automatically or
    # manually
    touch ${INSTALL_TARGET}/post_install
    chmod a+x ${INSTALL_TARGET}/post_install
    cat > ${INSTALL_TARGET}/post_install <<POST_EOF
    set -o errexit
    set -o nounset
    # functions (these could be a library, but why overcomplicate things
    SetValue () { VALUENAME="\$1" NEWVALUE="\$2" FILEPATH="\$3"; sed -i "s+^#\?\(\${VALUENAME}\)=.*\$+\1=\${NEWVALUE}+" "\${FILEPATH}"; }
    CommentOutValue () { VALUENAME="\$1" FILEPATH="\$2"; sed -i "s/^\(\${VALUENAME}.*\)\$/#\1/" "\${FILEPATH}"; }
    UncommentValue () { VALUENAME="\$1" FILEPATH="\$2"; sed -i "s/^#\(\${VALUENAME}.*\)\$/\1/" "\${FILEPATH}"; }
    # root password
    echo -e "${HR}\\nNew root user password\\n${HR}"
    passwd
    # add user
    echo -e "${HR}\\nNew non-root user password (username:${USERNAME})\\n${HR}"
    groupadd sudo
    useradd -m -g users -G audio,lp,optical,storage,video,games,power,scanner,network,sudo,wheel -s /bin/bash ${USERNAME}
    passwd ${USERNAME}
    # mirror ranking
    echo -e "${HR}\\nRanking Mirrors (this will take a while)\\n${HR}"
    cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
    mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.all
    sed -i "s/#S/S/" /etc/pacman.d/mirrorlist.all
    rankmirrors -n 5 /etc/pacman.d/mirrorlist.all > /etc/pacman.d/mirrorlist
    # temporary fix for locale.sh update conflict
    mv /etc/profile.d/locale.sh /etc/profile.d/locale.sh.preupdate || true
    # yaourt repo (add to target pacman, not tmp pacman.conf, for ongoing use)
    echo -e "\\n[archlinuxfr]\\nServer = http://repo.archlinux.fr/\\\$arch" >> /etc/pacman.conf
    echo -e "\\n[haskell]\\nServer = http://www.kiwilight.com/\\\$repo/\\\$arch" >> /etc/pacman.conf
    # additional groups and utilities
    pacman --noconfirm -Syu
    pacman --noconfirm -S base-devel
    pacman --noconfirm -S yaourt
    # sudo
    pacman --noconfirm -S sudo
    cp /etc/sudoers /tmp/sudoers.edit
    sed -i "s/#\s*\(%wheel\s*ALL=(ALL)\s*ALL.*$\)/\1/" /tmp/sudoers.edit
    sed -i "s/#\s*\(%sudo\s*ALL=(ALL)\s*ALL.*$\)/\1/" /tmp/sudoers.edit
    visudo -qcsf /tmp/sudoers.edit && cat /tmp/sudoers.edit > /etc/sudoers
    # power
    pacman --noconfirm -S acpi acpid acpitool cpufrequtils
    yaourt --noconfirm -S powertop2
    sed -i "/^DAEMONS/ s/)/ @acpid)/" /etc/rc.conf
    sed -i "/^MODULES/ s/)/ acpi-cpufreq cpufreq_ondemand cpufreq_powersave coretemp)/" /etc/rc.conf
    # following requires my acpi handler script
    echo "/etc/acpi/handler.sh boot" > /etc/rc.local
    # time
    pacman --noconfirm -S ntp
    sed -i "/^DAEMONS/ s/hwclock /!hwclock @ntpd /" /etc/rc.conf
    # wireless (wpa supplicant should already be installed)
    pacman --noconfirm -S iw wpa_supplicant rfkill
    pacman --noconfirm -S netcfg wpa_actiond ifplugd
    mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.orig
    echo -e "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=network\nupdate_config=1" > /etc/wpa_supplicant.conf
    # make sure to copy /etc/network.d/examples/wireless-wpa-config to /etc/network.d/home and edit
    sed -i "/^DAEMONS/ s/)/ @net-auto-wireless @net-auto-wired)/" /etc/rc.conf
    sed -i "/^DAEMONS/ s/ network / /" /etc/rc.conf
    echo -e "\nWIRELESS_INTERFACE=wlan0" >> /etc/rc.conf
    echo -e "WIRED_INTERFACE=eth0" >> /etc/rc.conf
    echo "options iwlagn led_mode=2" > /etc/modprobe.d/iwlagn.conf
    # sound
    pacman --noconfirm -S alsa-utils alsa-plugins
    sed -i "/^DAEMONS/ s/)/ @alsa)/" /etc/rc.conf
    mv /etc/asound.conf /etc/asound.conf.orig || true
    #if alsamixer isn't working, try alsamixer -Dhw and speaker-test -Dhw -c 2
    # video
    pacman --noconfirm -S base-devel mesa mesa-demos
    # x
    #pacman --noconfirm -S xorg xorg-xinit xorg-utils xorg-server-utils xdotool xorg-xlsfonts
    #yaourt --noconfirm -S xf86-input-wacom-git # NOT NEEDED? input-wacom-git
    #TODO: cut down the install size
    #pacman --noconfirm -S xorg-server xorg-xinit xorg-utils xorg-server-utils
    # TODO: wacom
    # environment/wm/etc.
    #pacman --noconfirm -S xfce4 compiz ccsm
    #pacman --noconfirm -S xcompmgr
    #yaourt --noconfirm -S physlock unclutter
    #pacman --noconfirm -S rxvt-unicode urxvt-url-select hsetroot
    #pacman --noconfirm -S gtk2 #gtk3 # for taffybar?
    #pacman --noconfirm -S ghc
    # note: try installing alex and happy from cabal instead
    #pacman --noconfirm -S haskell-platform haskell-hscolour
    #yaourt --noconfirm -S xmonad-darcs xmonad-contrib-darcs xcompmgr
    #yaourt --noconfirm -S xmobar-git
    # TODO: edit xfce to use compiz
    # TODO: xmonad, but deal with video tearing
    # TODO: xmonad-darcs fails to install from AUR. haskell dependency hell.
    # switching to cabal
    # fonts
    pacman --noconfirm -S terminus-font
    yaourt --noconfirm -S webcore-fonts
    yaourt --noconfirm -S fontforge libspiro
    yaourt --noconfirm -S freetype2-git-infinality
    # TODO: sed infinality and change to OSX or OSX2 mode
    # and create the sym link from /etc/fonts/conf.avail to conf.d
    # misc apps
    #pacman --noconfirm -S htop openssh keychain bash-completion git vim
    #pacman --noconfirm -S chromium flashplugin
    #pacman --noconfirm -S scrot mypaint bc
    #yaourt --noconfirm -S task-git stellarium googlecl
    # TODO: argyll
    POST_EOF
    # Post install in chroot
    #echo "chroot and run /post_install"
    chroot /install /post_install
    rm /install/post_install
    # copy grub.efi file to the default HP EFI boot manager path
    mkdir -p ${INSTALL_TARGET}/boot/EFI/Microsoft/BOOT/
    mkdir -p ${INSTALL_TARGET}/boot/EFI/BOOT/
    cp ${INSTALL_TARGET}/boot/grub/grub.efi ${INSTALL_TARGET}/boot/EFI/Microsoft/BOOT/bootmgfw.efi
    cp ${INSTALL_TARGET}/boot/grub/grub.efi ${INSTALL_TARGET}/boot/EFI/BOOT/BOOTX64.EFI
    cp /root/root.gpg ${INSTALL_TARGET}/boot/
    # NOTES/TODO

  • Dual booting Windows 8 and Arch Linux with UEFI

    Hi all!
    I'm trying to install Arch Linux on my computer where I already have Windows 8, and I'm getting a little stuck when it comes to the partitioning.
    Following the beginner's guide and the method here: https://wiki.archlinux.org/index.php/Un … n_in_Linux for setting up the partitions properly, regarding UEFI. My problem is that when using cgdisk to set up a new EFI system partition (ef00), I get an error message when trying to write the partition table (just saying that something went wrong). I figure the problem is that I already have a partition like this (correct me if I'm wrong), but it really looks like it succeded (see info below). So my question is: How do I preceed to keep my Windows 8 installation happy, but installing Arch? Do I remove the old EFI system partition and create a new one, or is there some method that allows me to edit the already existing one, to allow me to dual boot Windows 8 and Arch?
    My partition table now looks like this:
    Part. # Size Partition Type Partition Name
    1007KB free space
    1 500MB Windows RE Basic data partition
    2 300MB EFI System EFI system partition (this one was already present on my system)
    3 128MB Microsoft reserved Microsoft reserved partition
    4 63.5GB Microsoft basic data Basic data partition
    8 512MB EFI System EFI System partition (this is the one I tried to create when I got the error message)
    5 29.5GB Linux filesystem Arch (this is where I was going to put my Arch installation)
    6 22GB Windows RE Basic data partition
    7 1024MB Windows RE Basic data partition
    615KB free space
    Just for the record; I only created partition #8 and #5.
    Any help is appreciated! And sorry for beeing a total noob, but I really suck at this.

    sudo make sandwich wrote:If it is possible to share ESP between OSes, how do I do this (would it be sufficent to follow this section: https://wiki.archlinux.org/index.php/Beginners'_Guide#For_UEFI_motherboards)?
    There's really very little to do to share an ESP between OSes. Most OS installers will auto-detect the ESP and use it. Problem solved. For Arch it may be a bit more effort just because Arch uses a more hands-on installation process, but I've only done a couple of Arch installations, and the last one was several months ago, so I don't recall the details clearly enough to comment.
    And how big will the partition need to be? The beginner's guide says 512MB or higher.
    I don't know what was in the mind of the author, but my guess is that's because that's roughly the cutoff point where mkdosfs starts creating FAT32 by default rather than FAT16. The ESP is officially supposed to be FAT32, not FAT16, although FAT16 usually works OK. It's also possible to create FAT32 on smaller partitions by using an explicit option to mkdosfs ("-F 32").
    The optimal size of the ESP depends on the files stored on it. If you don't store your Linux kernels, something as small as 100MiB is usually adequate; but a few Linux kernels and their initrd files can consume twice that amount. My own recommendation is for the ESP to be 200-500MiB.
    The only error message I got from cgdisk is "Problem saving data! Your partition table may be damaged!", however booting Windows again works fine. Parted did not complain about antything.
    Use the "verify" function in cgdisk. That will reveal any problems with the data structures. If a verify turns up OK, then that means that cgdisk ran into some sort of disk problem. Running gdisk rather than cgdisk and using the gdisk "w" option (without making any changes) may produce a more helpful error message.

  • [SOLVED] 3d Acceleration on Arch Linux guest

    I've just installed the latest FTP Arch Linux (2009.02) as a Guest running in Virtual Box 3.0.2 in my Windows 7 host, and I cannot get Xorg working at all.
    - 3D Acceleration is enabled for the VM, and 128MB of video memory allocated
    - Guest Additions were installed successfully, added rc.vboxadd to daemons, and everything loads ok on startup.
    Output of 'dmesg | grep vbox':
    vboxadd: Successfully loaded version 3.0.2 (interface 0x0010004)
    vboxvfs: Successfully loaded version 3.0.2 (interface 0x0010004)
    [drm] Initialized vboxvideo 1.0.0 20090303 for 0000:00:02.0 on minor 0
    Here is my .xinitrc:
    /usr/bin/VBoxClient-all
    I've symlinked vboxvideo_dri.so since the installer didn't do it.
    Output of 'ls -l /usr/lib/xorg/modules/dri/vboxvideo_dri.so':
    lrwxrwxrwx 1 root root 19 2009-07-31 22:42 /usr/lib/xorg/modules/dri/vboxvideo_dri.so -> /usr/lib/VBoxOGL.so
    And error when I run 'startx':
    (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/vboxvideo_dri.so failed (libXcomposite.so.1: cannot open shared object file: No such file or directory)
    (EE) AIGLX: reverting to software rendering
    waiting for X server to shut down
    And then it shuts down, without even trying to load swrast_dri.so. But the weirdest part is, that symlink exists, but X is saying it doesn't! I've restarted the VM and still get the same error.
    Here is my xorg.conf (created by installing GA), and I do have HAL up and running, loaded before the rc.vboxadd daemon:
    # Default xorg.conf for Xorg 1.5+ without PCI_TXT_IDS_PATH enabled.
    # This file was created by VirtualBox Additions installer as it
    # was unable to find any existing configuration file for X.
    Section "Device"
    Identifier "VirtualBox Video Card"
    Driver "vboxvideo"
    EndSection
    So... what next? 
    Last edited by timmahcheese (2009-08-03 15:20:55)

    Silly me, I forgot the libxcomposite package. I guess I should read the errors closer.
    Anyway, I'm still getting an error (signal 11) being caused by VBoxClient-all. Here is my Xorg.0.log:
    X.Org X Server 1.6.2
    Release Date: 2009-7-7
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.30-ARCH i686
    Current Operating System: Linux obi-wan 2.6.30-ARCH #1 SMP PREEMPT Mon Jul 20 11:20:32 UTC 2009 i686
    Build Date: 18 July 2009 08:27:13PM
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 2 23:20:02 2009
    (==) Using config file: "/etc/X11/xorg.conf"
    (==) No Layout section. Using the first Screen section.
    (==) No screen section available. Using defaults.
    (**) |-->Screen "Default Screen Section" (0)
    (**) | |-->Monitor "<default monitor>"
    (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
    (**) | |-->Device "VirtualBox Video Card"
    (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
    (==) Automatically adding devices
    (==) Automatically enabling devices
    (WW) The directory "/usr/share/fonts/Type1" does not exist.
    Entry deleted from font path.
    (==) FontPath set to:
    /usr/share/fonts/misc,
    /usr/share/fonts/100dpi:unscaled,
    /usr/share/fonts/75dpi:unscaled,
    /usr/share/fonts/TTF,
    built-ins
    (==) ModulePath set to "/usr/lib/xorg/modules"
    (II) Cannot locate a core pointer device.
    (II) Cannot locate a core keyboard device.
    (II) The server relies on HAL to provide the list of input devices.
    If no devices become available, reconfigure HAL or disable AllowEmptyInput.
    (II) Loader magic: 0x7a40
    (II) Module ABI versions:
    X.Org ANSI C Emulation: 0.4
    X.Org Video Driver: 5.0
    X.Org XInput driver : 4.0
    X.Org Server Extension : 2.0
    (II) Loader running on linux
    (--) using VT number 7
    (--) PCI:*(0:0:2:0) 80ee:beef:0000:0000 InnoTek Systemberatung GmbH VirtualBox Graphics Adapter rev 0, Mem @ 0xe0000000/134217728
    (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
    (II) No APM support in BIOS or kernel
    (II) System resource ranges:
    [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
    [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
    [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
    [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
    [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
    [5] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
    (II) LoadModule: "extmod"
    (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
    (II) Module extmod: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
    (II) Loading extension MIT-SCREEN-SAVER
    (II) Loading extension XFree86-VidModeExtension
    (II) Loading extension XFree86-DGA
    (II) Loading extension DPMS
    (II) Loading extension XVideo
    (II) Loading extension XVideo-MotionCompensation
    (II) Loading extension X-Resource
    (II) LoadModule: "dbe"
    (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
    (II) Module dbe: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
    (II) Loading extension DOUBLE-BUFFER
    (II) LoadModule: "glx"
    (II) Loading /usr/lib/xorg/modules/extensions//libglx.so
    (II) Module glx: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
    (==) AIGLX enabled
    (II) Loading extension GLX
    (II) LoadModule: "record"
    (II) Loading /usr/lib/xorg/modules/extensions//librecord.so
    (II) Module record: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.13.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
    (II) Loading extension RECORD
    (II) LoadModule: "dri"
    (II) Loading /usr/lib/xorg/modules/extensions//libdri.so
    (II) Module dri: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
    (II) Loading extension XFree86-DRI
    (II) LoadModule: "dri2"
    (II) Loading /usr/lib/xorg/modules/extensions//libdri2.so
    (II) Module dri2: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.1.0
    ABI class: X.Org Server Extension, version 2.0
    (II) Loading extension DRI2
    (II) LoadModule: "vboxvideo"
    (II) Loading /usr/lib/xorg/modules/drivers//vboxvideo_drv.so
    (II) Module vboxvideo: vendor="Sun Microsystems, Inc."
    compiled for 1.5.99.901, module version = 1.0.1
    Module class: X.Org Video Driver
    ABI class: X.Org Video Driver, version 5.0
    (II) VBoxVideo: guest driver for VirtualBox: vbox
    (II) Primary Device is: PCI 00@00:02:0
    (II) resource ranges after xf86ClaimFixedResources() call:
    [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
    [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
    [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
    [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
    [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
    [5] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
    (II) resource ranges after probing:
    [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
    [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
    [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
    [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
    [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[b]
    [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[b]
    [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[b]
    [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
    [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
    [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[b]
    [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[b]
    (II) VBoxVideo(0): VirtualBox guest additions video driver version 3.0.2
    (II) Loading sub module "vbe"
    (II) LoadModule: "vbe"
    (II) Loading /usr/lib/xorg/modules//libvbe.so
    (II) Module vbe: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.1.0
    ABI class: X.Org Video Driver, version 5.0
    (II) Loading sub module "int10"
    (II) LoadModule: "int10"
    (II) Loading /usr/lib/xorg/modules//libint10.so
    (II) Module int10: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    ABI class: X.Org Video Driver, version 5.0
    (II) VBoxVideo(0): initializing int10
    (II) VBoxVideo(0): Primary V_BIOS segment is: 0xc000
    (II) VBoxVideo(0): VESA BIOS detected
    (II) VBoxVideo(0): VESA VBE Version 2.0
    (II) VBoxVideo(0): VESA VBE Total Mem: 131072 kB
    (II) VBoxVideo(0): VESA VBE OEM: VirtualBox VBE BIOS http://www.virtualbox.org/
    (II) VBoxVideo(0): VESA VBE OEM Software Rev: 0.2
    (II) VBoxVideo(0): VESA VBE OEM Vendor: Sun Microsystems, Inc.
    (II) VBoxVideo(0): VESA VBE OEM Product: VirtualBox VBE Adapter
    (II) VBoxVideo(0): VESA VBE OEM Product Rev: Sun VirtualBox Version 3.0.2
    (II) Loading sub module "ramdac"
    (II) LoadModule: "ramdac"
    (II) Module "ramdac" already built-in
    (II) Loading sub module "fb"
    (II) LoadModule: "fb"
    (II) Loading /usr/lib/xorg/modules//libfb.so
    (II) Module fb: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    ABI class: X.Org ANSI C Emulation, version 0.4
    (II) Loading sub module "shadowfb"
    (II) LoadModule: "shadowfb"
    (II) Loading /usr/lib/xorg/modules//libshadowfb.so
    (II) Module shadowfb: vendor="X.Org Foundation"
    compiled for 1.6.2, module version = 1.0.0
    ABI class: X.Org ANSI C Emulation, version 0.4
    (II) VBoxVideo(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
    (==) VBoxVideo(0): Depth 24, (--) framebuffer bpp 32
    (II) VBoxVideo(0): Output VBOX1 has no monitor section
    (II) VBoxVideo(0): The maximum supported resolution is currently 32000x32000
    (II) VBoxVideo(0): Output VBOX1 has no monitor section
    (II) VBoxVideo(0): Output VBOX1 connected
    (II) VBoxVideo(0): Using exact sizes for initial modes
    (II) VBoxVideo(0): Output VBOX1 using initial mode 1024x768
    (==) VBoxVideo(0): RGB weight 888
    (==) VBoxVideo(0): Default visual is TrueColor
    (==) VBoxVideo(0): Using gamma correction (1.0, 1.0, 1.0)
    (==) VBoxVideo(0): DPI set to (96, 96)
    (II) Loading sub module "dri"
    (II) LoadModule: "dri"
    (II) Reloading /usr/lib/xorg/modules/extensions//libdri.so
    (--) Depth 24 pixmap format is 32 bpp
    (II) do I need RAC? No, I don't.
    (II) resource ranges after preInit:
    [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
    [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
    [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
    [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
    [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[b]
    [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[b]
    [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[b]
    [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
    [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
    [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[b]
    [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[b]
    (==) VBoxVideo(0): Default visual is TrueColor
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenByBusid: Searching for BusID pci:0000:00:02.0
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenByBusid: drmOpenMinor returns 10
    drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
    (II) [drm] DRM interface version 1.3
    (II) [drm] DRM open master succeeded.
    (II) VBoxVideo(0): [drm] Using the DRM lock SAREA also for drawables.
    (II) VBoxVideo(0): [drm] framebuffer handle = 0xe0000000
    (II) VBoxVideo(0): [drm] added 1 reserved context for kernel
    (II) VBoxVideo(0): X context handle = 0x1
    (II) VBoxVideo(0): [drm] installed DRM signal handler
    (II) VBoxVideo(0): visual configurations initialized
    (==) VBoxVideo(0): Backing store disabled
    (II) VBoxVideo(0): RandR 1.2 enabled, ignore the following RandR disabled message.
    (II) VBoxVideo(0): DPMS enabled
    (II) VBoxVideo(0): The VBox video extensions are now enabled.
    (II) VBoxVideo(0): [DRI] installation complete
    (--) RandR disabled
    (II) Initializing built-in extension Generic Event Extension
    (II) Initializing built-in extension SHAPE
    (II) Initializing built-in extension MIT-SHM
    (II) Initializing built-in extension XInputExtension
    (II) Initializing built-in extension XTEST
    (II) Initializing built-in extension BIG-REQUESTS
    (II) Initializing built-in extension SYNC
    (II) Initializing built-in extension XKEYBOARD
    (II) Initializing built-in extension XC-MISC
    (II) Initializing built-in extension SECURITY
    (II) Initializing built-in extension XINERAMA
    (II) Initializing built-in extension XFIXES
    (II) Initializing built-in extension RENDER
    (II) Initializing built-in extension RANDR
    (II) Initializing built-in extension COMPOSITE
    (II) Initializing built-in extension DAMAGE
    (II) AIGLX: Screen 0 is not DRI2 capable
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 11, (OK)
    drmOpenByBusid: Searching for BusID pci:0000:00:02.0
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 11, (OK)
    drmOpenByBusid: drmOpenMinor returns 11
    drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
    (II) Next line is added to allow vboxvideo_drv.so to appear as whitelisted driver
    (II) The file referenced, is *NOT* loaded
    (II) Loading /usr/lib/xorg/modules/drivers//ati_drv.so
    (EE) AIGLX error: vboxvideo does not export required DRI extension
    (EE) AIGLX: reverting to software rendering
    (II) AIGLX: Loaded and initialized /usr/lib/xorg/modules/dri/swrast_dri.so
    (II) GLX: Initialized DRISWRAST GL provider for screen 0
    (II) VBoxVideo(0): Setting screen physical size to 270 x 203
    (II) config/hal: Adding input device Macintosh mouse button emulation
    (II) LoadModule: "evdev"
    (II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
    (II) Module evdev: vendor="X.Org Foundation"
    compiled for 1.6.1, module version = 2.2.2
    Module class: X.Org XInput Driver
    ABI class: X.Org XInput driver, version 4.0
    (**) Macintosh mouse button emulation: always reports core events
    (**) Macintosh mouse button emulation: Device: "/dev/input/event0"
    (II) Macintosh mouse button emulation: Found 3 mouse buttons
    (II) Macintosh mouse button emulation: Found x and y relative axes
    (II) Macintosh mouse button emulation: Configuring as mouse
    (**) Macintosh mouse button emulation: YAxisMapping: buttons 4 and 5
    (**) Macintosh mouse button emulation: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
    (**) Macintosh mouse button emulation: (accel) keeping acceleration scheme 1
    (**) Macintosh mouse button emulation: (accel) filter chain progression: 2.00
    (**) Macintosh mouse button emulation: (accel) filter stage 0: 20.00 ms
    (**) Macintosh mouse button emulation: (accel) set acceleration profile 0
    (II) config/hal: Adding input device ImExPS/2 Generic Explorer Mouse
    (**) ImExPS/2 Generic Explorer Mouse: always reports core events
    (**) ImExPS/2 Generic Explorer Mouse: Device: "/dev/input/event5"
    (II) ImExPS/2 Generic Explorer Mouse: Found 5 mouse buttons
    (II) ImExPS/2 Generic Explorer Mouse: Found x and y relative axes
    (II) ImExPS/2 Generic Explorer Mouse: Found scroll wheel(s)
    (II) ImExPS/2 Generic Explorer Mouse: Configuring as mouse
    (**) ImExPS/2 Generic Explorer Mouse: YAxisMapping: buttons 4 and 5
    (**) ImExPS/2 Generic Explorer Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) XINPUT: Adding extended input device "ImExPS/2 Generic Explorer Mouse" (type: MOUSE)
    (**) ImExPS/2 Generic Explorer Mouse: (accel) keeping acceleration scheme 1
    (**) ImExPS/2 Generic Explorer Mouse: (accel) filter chain progression: 2.00
    (**) ImExPS/2 Generic Explorer Mouse: (accel) filter stage 0: 20.00 ms
    (**) ImExPS/2 Generic Explorer Mouse: (accel) set acceleration profile 0
    (II) config/hal: Adding input device AT Translated Set 2 keyboard
    (**) AT Translated Set 2 keyboard: always reports core events
    (**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
    (II) AT Translated Set 2 keyboard: Found keys
    (II) AT Translated Set 2 keyboard: Configuring as keyboard
    (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Option "xkb_model" "evdev"
    (**) Option "xkb_layout" "us"
    (II) config/hal: Adding input device VirtualBox Guest Service
    (II) LoadModule: "vboxmouse"
    (II) Loading /usr/lib/xorg/modules/input//vboxmouse_drv.so
    (II) Module vboxmouse: vendor="Sun Microsystems Inc."
    compiled for 0.0.0, module version = 1.0.0
    Module class: X.Org XInput Driver
    ABI class: X.Org XInput driver, version 4.0
    (**) VirtualBox Guest Service: always reports core events
    (**) VirtualBox Guest Service: Device: "/dev/vboxadd"
    (II) XINPUT: Adding extended input device "VirtualBox Guest Service" (type: MOUSE)
    (**) VirtualBox Guest Service: (accel) keeping acceleration scheme 1
    (**) VirtualBox Guest Service: (accel) filter chain progression: 2.00
    (**) VirtualBox Guest Service: (accel) filter stage 0: 20.00 ms
    (**) VirtualBox Guest Service: (accel) set acceleration profile 0
    (**) VirtualBox Guest Service: Mouse Integration associated with screen 0
    (II) VirtualBox Guest Service: On.
    Backtrace:
    0: /usr/bin/X(xorg_backtrace+0x3b) [0x813154b]
    1: /usr/bin/X(xf86SigHandler+0x9e) [0x80cacee]
    2: [0xb8008400]
    3: /usr/bin/X(Dispatch+0x80) [0x808c350]
    4: /usr/bin/X(main+0x395) [0x8072005]
    5: /lib/libc.so.6(__libc_start_main+0xe6) [0xb7be2a36]
    6: /usr/bin/X [0x80714b1]
    Fatal server error:
    Caught signal 11. Server aborting
    Please consult the The X.Org Foundation support
    at http://wiki.x.org
    for help.
    Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    (II) Macintosh mouse button emulation: Close
    (II) UnloadModule: "evdev"
    (II) ImExPS/2 Generic Explorer Mouse: Close
    (II) UnloadModule: "evdev"
    (II) AT Translated Set 2 keyboard: Close
    (II) UnloadModule: "evdev"
    (II) VirtualBox Guest Service: Off.
    (II) VirtualBox Guest Service: Close
    (II) UnloadModule: "vboxmouse"
    Last edited by timmahcheese (2009-08-03 04:07:48)

  • [VIDEO TUTORIAL] Installing Arch Linux on GPT/LVM/GRUB2

    Hello everyone,
    I've recently switched over from running my machine on LVM with a MSDOS partition style, and I was tired of the limitations of it. Such as 4 primary partions or 3 primary and 1 extended. It was also hindering my flexibility since I had to make 1 primary partition that was /boot, which forced me to make an initram image if I wanted to put my / inside of the LVM. The only way I could truly fix all my problems was to move away from GRUB-Legacy (Which I love since it's so easy to configure) over to GRUB 2(Which is not as bad as I thought it was).
    I made this video to help people trying to do this combination. I also included the links to further information in the videos' description. It contains a link to GRUB 2 Architecture and moving over to GRUB (on IBM's site), and also ArchWiki resources for further reading.
    I hope you enjoy it.
    http://www.youtube.com/watch?v=69X9ZYA41xU
    After you finish doing this, you will end up with this style:
    GPT Partition Layout w/ Protective MBR.
    /dev/sda1 - BIOS Boot Partition
    /dev/sda2 - Linux LVM (arch is name of LVM)
    --> /dev/arch/boot - ext2
    --> /dev/arch/swap - swap
    --> /dev/arch/root - ext4
    --> /dev/arch/home - ext4

    As a complete newbie to partitioning on Linux I'd like to say how grateful I am to for making this.
    You've kept it clear, clean and simple which I appreciate.
    As most of my ventures into installing Linux is usually accompanied with a graphical installer a great deal of this is fairly alien. It could be nice to have a wiki entry just laying out a few examples for partitioning and setting up arch in various simple and exotic ways.
    Again, thank you for this contribution. (While I quickly transcribe the steps in your video and ready the 'man' command)
    Edit:
    Basic step by step transcription
    [root@archiso ~]# modprobe dm-mod
    [root@archiso ~]# dhcpcd
    [root@archiso ~]# pacman -Syy gptfdisk
    [root@archiso ~]# gdisk /dev/sda
    GPT fdisk (gdisk) version 0.8.1
    Partition table scan:
    MBR: not present
    BSD: not present
    APM: not present
    GPT: not present
    Creating new GPT entries.
    Command (? for help): [n]
    Partition number (1-128, default 1): [RETURN]
    First sector (34-[max], default = 34) or {+-}size{KMGTP}: [RETURN]
    Information: Moved requested sectory from 34 to 2048 in
    order to align on 2048-sector boundries.
    Use 'l' on the experts' menu to adjust alignment
    Last sector (2048-[max], default = [max]) or{+-}size{KMGTP}: [+32MB]
    Current type is 'Linux filesystem'
    Hex code or GUID (L to show codes, Enter = 8300): [EF02]
    Changed type of partition to 'BIOS boot partition'
    Command (? for help): [n]
    Partition number (2-128, default 2): [RETURN]
    First sector (34-[max], default = 67584) or {+-}size{KMGTP}: [RETURN]
    Last sector (2048-[max], default = [max]) or {+-}size{KMGTP}: [RETURN]
    Current type is 'Linux filesystem'
    Hex code or GUID (L to show codes, Enter = 8300): [8E00]
    Changed type of partition to 'Linux LVM'
    Command (? for help): [w]
    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!
    Do you want to proceed? (Y/N): [y]
    OK: writing new GUID partition table (GPT).
    The operaton has completed successfully.
    [root@archiso ~]# pvcreate /dev/sda2
    [root@archiso ~]# vgcreate arch /dev/sda2
    [root@archiso ~]# vgdisplay
    [root@archiso ~]# lvcreate -L 100M -n boot arch
    [root@archiso ~]# lvcreate -C y -L 1G -n swap arch
    [root@archiso ~]# lvcreate -L 10G -n root arch
    [root@archiso ~]# lvcreate -l 100%FREE -n home arch
    [root@archiso ~]# lvscan
    [root@archiso ~]# mkfs.ext2 /dev/arch/boot
    [root@archiso ~]# mkfs.ext4 /dev/arch/root
    [root@archiso ~]# mkfs.ext4 /dev/arch/home
    [root@archiso ~]# mkswap /dev/arch/swap
    [root@archiso ~]# /arch/setup
    Prepare Hard Drive
    3 Manually Configure block devices, filesystems andmountpoints
    Partition Access Method
    dev directly by /dev/* (most intuitive but devicefile names can change
    Manage Filesystems
    /dev/sda1 raw - 32MiB N
    /dev/mapper/arch-boot raw - 100MiB N > [IGNORE]
    /dev/mapper/arch-home raw - 91000MiB N > filesystem (re)created? [NO] > ext4 home
    /dev/mapper/arch-root raw - 10240MiB N > filesystem (re)created? [NO] > ext4 root
    /dev/mapper/arch-swap raw - 1024MiB N > filesystem (re)created? [NO] > swap
    Choose bootloader
    [SKIP]
    Configuration
    mkinitcpio > HOOKS="...lvm2..."
    DONE
    Exit
    [root@archiso ~]# mount -o bind /dev /mnt/dev
    [root@archiso ~]# mount -t proc /proc /mnt/proc
    [root@archiso ~]# mount -t sysfs /sys /mnt/sys
    [root@archiso ~]# chroot /mnt /bin/bash
    [root@archiso /]# dhcpcd
    [root@archiso /]# pacman-db-upgrade
    [root@archiso /]# pacman -Syy grub2-bios
    [root@archiso /]# grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda
    [root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
    [root@archiso /]# exit
    [root@archiso ~]# reboot
    login
    [root@host ~]# $EDITOR /etc/default/grub
    #GRUB_GFXMODE=auto
    #GRUB_GFXPAYLOAD_LINUX=keep
    #GRUB_COLOR_NORMAL="light-blue/black"
    #GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
    [root@host ~]# chmod -x /etc/grub.d/10_linux
    [root@host ~]# $EDITOR /etc/grub.d/40_custom
    menuentry "Arch Linux" {
    insmod lvm
    set root=(arch-boot)
    linux /vmlinuz-linux root=/dev/arch/root ro
    initrd /initramfs-linux.img
    menuentry "Arch Linux Fallback" {
    insmod lvm
    set root=(arch-boot)
    linux /vmlinuz-linux root=/dev/arch/root ro
    initrd /initramfs-linux-fallback.img
    [root@host ~]# grub-mkconfig -o /boot/grub/grub.cfg
    [root@host ~]# reboot
    Last edited by Earnestly (2012-01-09 11:51:45)

  • Arch Linux Pacman Proxy Script

    Since my Arch box has no internet connection (yes, I'm that much of a masochist), I wrote a bash script to act as a proxy of sorts for pacman, at least as regards downloading. It took a while to get it working (intermittent web access and all) but here it finally is, as promised.
    It works well for me, and I only hope that it will help anyone else in the same situation (if there is anyone else in the same situation).
    The script has various options to explain everything you need to know, but here's a quick word of warning: it only works on POSIX-compatible computers (i.e. no Wintendows, usually) and the proxy box needs to have bash, wget, tar, grep and sed installed. I don't see this as being a problem, but if I'm wrong, tell me all about it.
    #!/bin/bash
    readonly VER="2.1"
    readonly wgetVER=`wget -V|sed '1!d'`
    # DEBUG levels:
    # Set to 0 for ALERT-level messages only
    # Set to 1 for INFO-level messages (I prefer this)
    # Set to 2 for DEBUG-level messages
    # Set to 3 for all messages
    readonly DEBUG=0
    # Set DEBUGLOG=1 to print ALERT, INFO and DEBUG messages to DEBUG.log
    readonly DEBUGLOG=0
    readonly COLOUR=true
    if [[ $COLOUR == true ]] ; then
    readonly red='\e[31m'
    readonly warn='\e[31;7m '
    readonly green='\e[32m'
    readonly lgreen='\e[32;1m'
    readonly yellow='\e[33;1m'
    readonly lblue='\e[34;1m'
    readonly dull='\e[0m' ; fi
    # Sticky details:
    # tar seems very slow (vfat? transform? USB?)
    function bugspray {
    [[ -z $2 ]] && verbosity=1 || verbosity=$2
    if (( DEBUG >= verbosity )) ; then
    (( $2 == 0 )) && intro="${warn}ALERT${dull} | "
    (( $2 == 1 )) && intro=" INFO | "
    (( $2 > 1 )) && intro=" ${yellow}DEBUG${dull} | "
    echo -e "$intro$1"
    (( DEBUGLOG == 1 )) && echo "`date +%F_%T` | $1">>log-alpps/DEBUG.log ; fi ; }
    function compare_versions {
    # Requires two ordinary, untweaked version strings, first local, second distant
    if [[ -z $2 ]] ; then
    bugspray "compare_versions didn't receive two variables." 2 ; fi
    update='no'
    [[ -z $2 ]] && return
    local localversion=(`echo $1|sed -r 's/([[:alpha:]]+)/ \1 /g;s/[\.:~_-]/ /g'`)
    local distantversion=(`echo $2|sed -r 's/([[:alpha:]]+)/ \1 /g;s/[\.:~_-]/ /g'`)
    local max=$((${#distantversion[*]}))
    bugspray "localversion: ${localversion[*]}; distantversion: ${distantversion[*]}" 2
    for (( x=0 ; (( x < $max )) ; $((x++)) )) ; do
    bugspray "local version part: `echo ${localversion[$x]}` | distant version part: `echo ${distantversion[$x]}`" 2
    if [[ `echo ${localversion[$x]}|grep -E '^[0-9]*$'` && `echo ${distantversion[$x]}|grep -E '^[0-9]*$'` ]] ; then
    bugspray "Numerical comparison" 2
    bugspray "localver (${localversion[$x]}) less than distantver (${distantversion[$x]}): $(( 10#${localversion[$x]} < 10#${distantversion[$x]} ))" 3
    # Different compare methods for numbers, single letters and multiple letters.
    if (( 10#${localversion[$x]} < 10#${distantversion[$x]} )) ; then
    update='yes'
    break ; fi ; fi
    if [[ `echo ${localversion[$x]}|grep -E '^[[:alpha:]]$'` && `echo ${distantversion[$x]}|grep -E '^[[:alpha:]]$'` ]] ; then # single letter -> compare
    bugspray "Lexicographical comparison" 2
    bugspray "localver (${localversion[$x]}) less than distantver (${distantversion[$x]}): [[ ${localversion[$x]} < ${distantversion[$x]} ]]" 3
    if [[ ${localversion[$x]} < ${distantversion[$x]} ]] ; then
    update='yes'
    break ; fi ; fi
    if [[ `echo ${localversion[$x]}|grep -E '^[[:alpha:]]+$'` && `echo ${distantversion[$x]}|grep -E '^[[:alpha:]]+$'` ]] ; then # string -> drop
    # cvs / git / beta -> what are the rules?
    bugspray "Sequence of letters. Not treating as version number." 2 ; fi
    done ; }
    function find_dependencies {
    # Determine existence via unique path
    bugspray "+ ${lgreen}Building download list for package \"$1\"${dull}" 1
    local packagename
    local dlfile
    local package_found=no
    if [[ `ls .temp-alpps/*.db/$1-* 2>/dev/null` ]] ; then
    bugspray "Analogous package-name file(s) found" 2
    for x in `ls .temp-alpps/*.db/$1-*/desc` ; do
    bugspray "Checking $x" 2
    packagename=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $x`
    if [[ j$packagename == j$1 ]] ; then
    bugspray "Exact match found: $packagename = $1" 2
    dlfile=`sed '/%FILENAME%/,+1!d;/%FILENAME%/d' $x`
    local distantversion=`sed '/%VERSION%/,+1!d;/%VERSION%/d' $x`
    local package_full=$packagename-$distantversion
    local the_repo=`echo $x|sed -r 's/.temp-alpps\/(.*)\.db.*/\1/'`
    local the_path=`echo $x|sed -r 's/desc//'`
    unplus=`echo $packagename|sed 's/\+/\\\+/g'`
    local local_version=`sed -r '/^'$unplus' /!d;s/.* //' .temp-alpps/snapshot.state`
    package_found=yes
    break ; fi ; done ; fi
    if [[ -z $dlfile ]] ; then
    bugspray "Exact match not found -> looking for replacements." 2
    if ! [[ -z `grep $1 .temp-alpps/*.db/*/depends` ]] ; then
    local provisional=`grep $1 .temp-alpps/*.db/*/depends|sed -r 's/\/depends.*//'`
    for package in $provisional ; do
    local providence=`sed -r '/%PROVIDES%/,/^$/!d;/%PROVIDES%/d;/^$/d;s/>.*//;s/=.*//' $package/depends`
    for y in $providence ; do
    if [[ j$y == j$1 ]] ; then
    # But what about when several packages provide the same thing and ALPPS picks the wrong one? Can it happen?
    local newdep=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $package/desc`
    bugspray " -> Package \"$newdep\" provides \"$1\"." 1
    find_dependencies $newdep
    break 2 ; fi ; done ; done
    if [[ -z $newdep ]] ; then
    bugspray "${warn}Warning:${dull} package \"$1\" not found in database." 0 ; fi ; fi ; fi
    bugspray "package: $1 | package_found = $package_found" 2
    # Add file to download_list if not up to date and if not already present
    if [[ j$package_found == jyes ]] ; then
    local already_got_one=no
    unplus=`echo $dlfile|sed 's/\+/\\\+/g'`
    [[ `echo $download_files|grep $unplus` ]] && already_got_one="yes" && bugspray "${green}Package in queue${dull}" 1
    [[ `ls downloads/$dlfile 2>/dev/null` ]] && already_got_one="yes" && bugspray "${green}Package proxied${dull}" 1
    compare_versions $local_version $distantversion
    bugspray "compare_versions says: $update" 2
    ! [[ -z $local_version || $update == yes ]] && already_got_one="yes" && bugspray "${green}Package already installed and up-to-date${dull}" 1
    if [[ j$already_got_one != jyes ]] ; then
    bugspray "${green}Confirm downloading${dull}" 1
    download_files+="$dlfile "
    download_array[${dlfile}]=$the_repo
    bugspray "Checking for further dependencies" 2
    if [[ -a $the_path/depends && `grep -E '^%DEPENDS%$' $the_path/depends` ]] ; then
    local dependency=`sed -r '/%DEPENDS%/d;/^$/q' $the_path/depends`
    bugspray "Dependencies of \"$packagename\":$dependency" 3
    for x in $dependency ; do
    # Is this dependency already installed? Sort-of the same as higher up; it just saves time here.
    local depname=`echo $x|sed -r 's/>.*//;s/=.*//'`
    local depminver=`echo $x|sed -r 's/.*>//'`
    bugspray "Dependency name: \"$depname\"" 2
    if ! [[ `grep -E '^$depname ' .temp-alpps/snapshot.state` ]] ; then
    find_dependencies $depname ; fi ; done
    else
    bugspray "${lblue}End of the line${dull}: package \"$packagename\" has no dependencies." 2
    true ; fi ; fi ; fi ; }
    function failover_fetch {
    echo "Downloading `echo $1|sed 's/.*\///'`"
    [[ -d log-alpps/ ]] || mkdir log-alpps/
    [[ -z $success ]] || unset success
    for mirror in $(<.temp-alpps/snapshot.mirrorlist) ; do
    # If DEBUG>0, shouldn't redirect output
    url=`echo $mirror|sed 's/$arch/'$arch'/;s/$repo/'${download_array[$1]}'/'`/$1
    bugspray "Connecting to $url" 2
    wget -o .temp-alpps/very-temp-log -U "Arch Linux Pacman Proxy Script version $VER / $wgetVER" -P downloads/ $url && success=true
    cat .temp-alpps/very-temp-log>>log-alpps/download.log
    rm -f .temp-alpps/very-temp-log
    if [[ -n $success ]] ; then
    bugspray "Download: \$success = true" 2
    break ; fi ; done
    if [[ -z $success ]] ; then
    bugspray "${warn}FAIL:${dull} $1 not accessible on known mirrors." 0 ; fi ; }
    case $1 in
    warranty)
    echo
    echo -e " ${green}Warranty${dull}"
    echo -e " ${green}========${dull}"
    echo " This program is free software. It comes without any warranty, to"
    echo " the extent permitted by applicable law. You can redistribute it"
    echo " and/or modify it under the terms of the Do What The Fuck You Want"
    echo " To Public License, Version 2, as published by Sam Hocevar. See"
    echo " http://sam.zoy.org/wtfpl/COPYING for more details."
    echo
    howto)
    echo
    echo -e " ${green}How to use ALPPS${dull}"
    echo -e " ${green}================${dull}"
    echo -e " ${yellow}+ Step 0${dull}: prime the engine"
    echo " On your offline box, copy the ALPPS script onto a removable medium, cd into"
    echo " it's directory, then run it with the \"init\" option. This essentially"
    echo " takes a snapshot of your system, package-wise. Your removable medium is"
    echo " now ready for use!"
    echo -e " ${yellow}+ Step 1${dull}:"
    echo " On the proxy box the first order of business is to download and decompress"
    echo " the current package lists. You can do this with the \"fetchdb\" option."
    echo -e " ${yellow}+ Step 1 alt${dull}:"
    echo " If you want to download the package lists without decompressing them,"
    echo " \"fetchdb simple\" will do this. It's a lot quicker, but please keep"
    echo " in mind that you cannot then do anything in step 2."
    echo -e " ${yellow}+ Step 2${dull}:"
    echo " If you want to download packages (and why wouldn't you?), the easiest way"
    echo " is to prepare a simple text file containing the names of the packages you"
    echo " want, one on each line. Run ALPPS with the option \"fetch <filename>\" and"
    echo " sit back and wait until it's done. Don't worry about dependencies: ALPPS"
    echo " handles them automatically."
    echo -e " ${yellow}+ Step 2 alt${dull}:"
    echo " As a convenience, \"fetch full\" will download all the packages needed to"
    echo " update the offline box."
    echo -e " ${yellow}+ Step 3${dull}:"
    echo " Finally, back on your offline box, run ALPPS again with the \"install\""
    echo " option. This will update the package list and copy the package files into"
    echo " local cache. You can now run \"pacman -S <package names>\" to finish"
    echo " installing the packages."
    # ALPPS no longer installs the packages, just caches them locally.
    # Not entirely sure why; it just felt too klutzy.
    echo -e " ${yellow}+ Step 4${dull}:"
    echo " You will now probably want to delete all the stuff you no longer need. Run"
    echo " ALPPS with the option \"clean\". This won't touch your request file(s). It"
    echo -e " ${red}WILL${dull} delete log files, so if you want to keep them, back them up first."
    echo " Next time you do this, don't forget to run ALPPS with \"init\" again."
    echo
    bugs)
    echo
    echo -e " ${green}Where this goes wrong${dull}"
    echo -e " ${green}=====================${dull}"
    echo " + ALPPS is a bit slow when packages have many dependencies. It's a recursive"
    echo " shell script: what did you expect?"
    echo " + It only uses the settings in /etc/pacman.conf. If your conf file is"
    echo " elsewhere, you're SOL. Similarly, the repositories are all taken from"
    echo " /etc/pacman.d/mirrorlist. If you added any custom repositories in"
    echo " /etc/pacman.conf (or any other file), ALPPS ignores them."
    echo " + As it stands, ALPPS only works when the proxy box has bash, wget, sed,"
    echo " grep and tar installed. The offline box needs bash, pacman and sed (in"
    echo " theory, this shouldn't be a problem...)."
    echo " + There is as yet no way of handling package groups, short of listing every"
    echo " member of the group."
    echo " + I don't think ALPPS will ever be able to handle AUR packages. Of course, if"
    echo " you're compiling AUR packages, you probably won't need something like this!"
    echo
    faq)
    echo
    echo -e " ${green}Frequently Asked Questions${dull}"
    echo -e " ${green}==========================${dull}"
    echo
    echo -e " ${red}Q:${dull} Can I run the whole thing off a USB stick?"
    echo -e " ${lblue}A:${dull} Certainly."
    echo
    echo -e " ${red}Q:${dull} Can I use a non-POSIX computer as a proxy (e.g. Windows)?"
    echo -e " ${lblue}A:${dull} Probably not, unless that computer has a POSIX-compatibility layer"
    echo " installed (such as Cygwin) with bash, wget, tar, sed and grep."
    echo
    echo -e " ${red}Q:${dull} Do I need to download the package list, waste time updating my computer,"
    echo " then go back again to download the packages I want?"
    echo -e " ${lblue}A:${dull} Nope! You can update the packagelist database and download piping-hot"
    echo " fresh packages, all in one sitting."
    echo -e " ${red}Q:${dull} You mean I won't have to futz around with package lists that keep updating"
    echo " ten minutes after I download them?"
    echo -e " ${lblue}A:${dull} Exactly. Nice, isn't it?"
    echo
    echo -e " ${red}Q:${dull} Does this thing handle SSL and signed packages?"
    echo -e " ${lblue}A:${dull} ALPPS uses SSL if:"
    echo " - the mirror has an https address (at present, none do), and"
    echo " - wget on the proxy box is compiled with SSL support"
    echo " Concerning signed packages: no, but then again, it doesn't need to. ALPPS"
    echo " downloads packages; it's pacman's responsibility to verify them. Your"
    echo " system remains safe (or as safe as it ever was, at any rate)."
    echo -e " ${red}Q:${dull} What about gpg keys? I need to get them."
    echo -e " ${lblue}A:${dull} ...maybe later, say, in version 3."
    echo
    echo -e " ${red}Q:${dull} ALPPS says it \`prepares databases´. Can pacman still use them after this?"
    echo -e " ${lblue}A:${dull} Yes, it can. In fact, what ALPPS does is extract the databases into a"
    echo " temp directory, without altering the original .db files."
    echo
    echo -e " ${red}Q:${dull} Where can I contact you?"
    echo -e " ${lblue}A:${dull} For constructive, useful questions and comments: [email protected] and"
    echo " be sure to mention Arch Linux in the subject."
    echo " For flames, trolling, spam and the like, visit your local bitbucket."
    echo
    todo)
    echo
    echo -e " ${green}What's next?${dull}"
    echo -e " ${green}============${dull}"
    echo -e " + I ${red}might${dull} be able to extend the reach of this thing to the AUR."
    echo " Yes, I know I said ALPPS couldn't (in \"bugs\"), but I've learned"
    echo " something new since then. It'll be tricky, though, since the AUR web"
    echo " interface delivers results in python. While this should be a Good Thing,"
    echo " bash isn't very good at handling python-format lists and dicts."
    echo
    -v|ver|version|--ver|--version)
    echo -e "${lgreen}Arch Linux pacman proxy script${dull} | ${yellow}version $VER${dull}"
    dl_list) # Debugging
    (( DEBUG == 0 )) && echo "the \"dl_list\" option is only for debugging" && exit 0
    arch=$(<.temp-alpps/snapshot.architecture)
    unset download_files
    unset download_array
    declare -A download_array
    find_dependencies $2
    bugspray "Download list: $download_files" 3
    echo "Download list v2:"
    for x in $download_files ; do
    bugspray " File \"$x\" from repo \"${download_array[$x]}\"" 3
    echo " Full URL: http://mirror.archlinux.org/${download_array[$x]}/os/$arch/$x" ; done
    verint) # Debugging
    (( DEBUG == 0 )) && echo "the \"verint\" option is only for debugging" && exit 0
    for x in `ls .temp-alpps/*/$2-*/desc` ; do
    packagename=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $x`
    if [[ j$packagename == j$2 ]] ; then
    bugspray "Unique package-name file found: $packagename=$2" 2
    distantversion=`sed '/%VERSION%/,+1!d;/%VERSION%/d' $x`
    dlfile=`sed '/%FILENAME%/,+1!d;/%FILENAME%/d' $x`
    package_full=$packagename-$distantversion
    the_repo=`echo $x|sed -r 's/.temp-alpps\/(.*)\.db.*/\1/'`
    the_path=`echo $x|sed -r 's/desc//'`
    local_version=`sed -r '/^'$packagename' /!d;s/.* //' .temp-alpps/snapshot.state`
    break ; fi ; done
    echo "full package filename: $dlfile"
    echo "Comparing local ($local_version) and distant ($distantversion) versions of $2..."
    compare_versions $local_version $distantversion
    #compare_versions 2.5beta3-2 2.5cvs4-1
    echo "...and the verdict is: $update"
    init)
    x=`uname -m`
    if [[ -x /usr/bin/pacman ]] ; then
    [[ -d .temp-alpps ]] || mkdir .temp-alpps/
    pacman -Q>.temp-alpps/snapshot.state
    sed -r '/^Se/!d;s/Server = //' /etc/pacman.d/mirrorlist>.temp-alpps/snapshot.mirrorlist
    sed -r '/^\[/!d;/options/d;s/\[(.*)\]/\1/' /etc/pacman.conf>.temp-alpps/snapshot.repositories
    sed -r '/^Architecture/!d;s/^.*= //' /etc/pacman.conf>.temp-alpps/snapshot.architecture
    [[ ! -s .temp-alpps/snapshot.architecture || auto == $(<.temp-alpps/snapshot.architecture) ]] && $x>.temp-alpps/snapshot.architecture
    sed -r '/^SyncFirst/!d;s/.*= //;s/ /\n/g' /etc/pacman.conf>.temp-alpps/snapshot.prioritypackages
    echo "Current state recorded."
    else
    echo "You seem to be running ALPPs on an unsupported system."
    echo "ALPPS is the ${lgreen}Arch Linux Pacman Proxy Script${dull} and simply"
    echo "won't run properly on a non-pacman OS (except when proxying)."
    echo "Aborting. Sorry."
    exit 1 ; fi
    fetchdb)
    [[ -d downloads ]] || mkdir downloads
    arch=$(<.temp-alpps/snapshot.architecture)
    declare -A download_array
    for repo in $(<.temp-alpps/snapshot.repositories) ; do
    download_array[${repo}.db]=$repo
    location="${repo}.db"
    failover_fetch $location ; done
    if [[ j$2 != jsimple ]] ; then
    [[ -d log-alpps ]] || mkdir log-alpps
    [[ -a syncfirst ]] && rm -f syncfirst
    echo "Preparing databases for local processing. This might take a while."
    for x in $(<.temp-alpps/snapshot.repositories) ; do
    echo "Preparing $x.db"
    if [[ -a downloads/$x.db ]] ; then
    [[ -d .temp-alpps/$x.db ]] || mkdir .temp-alpps/$x.db/
    tar -xzC .temp-alpps/$x.db/ -f downloads/$x.db --transform 's/:/§/' --no-same-owner && echo "$x database ready for use."
    else
    echo -e "Database $x.db is missing. Skipping. This will probably cause problems." ; fi ; done
    # SyncFirst package warning
    [[ -z $download_list ]] || unset download_list
    [[ -a syncfirst ]] && rm -f syncfirst
    for x in $(<.temp-alpps/snapshot.prioritypackages) ; do
    find_dependencies $x ; done
    bugspray "download_files: $download_files" 2
    if [[ ! -z $download_files ]] ; then
    echo "New version(s) of SyncFirst package(s):"
    for x in $(<.temp-alpps/snapshot.prioritypackages) ; do
    [[ ! -z `echo $download_files|grep $x` ]] && echo "- $x" && echo $x>>syncfirst ; done
    echo "Package names placed in 'syncfirst'. Don't forget to download them!" ; fi ; fi
    fetch)
    for x in $(<.temp-alpps/snapshot.repositories) ; do
    if ! [[ -d .temp-alpps/$x.db/ ]] ; then
    bugspray "You must first download a fresh database with the \"fetchdb\" option" 0
    exit 1 ; fi ; done
    arch=$(<.temp-alpps/snapshot.architecture)
    unset download_array
    declare -A download_array
    unset download_files
    if [[ $2 == full ]] ; then
    echo " Building full upgrade list. This will almost certainly take a while."
    echo " Please wait..."
    for y in `sed -r 's/^(.*) .*/\1/' .temp-alpps/snapshot.state` ; do
    bugspray "Examining $y" 1
    find_dependencies $y ; done
    elif [[ -a $2 ]] ; then
    echo " Determining dependencies. This might take a while. Please wait."
    for y in $(<$2) ; do
    bugspray "Examining $y" 1
    find_dependencies $y ; done
    else
    echo " Error: you should provide a list-file or the keyword \"full\"."
    echo " (see 'alpps.sh howto', step 2)"
    exit 1 ; fi
    if [[ -z $download_files ]] ; then
    echo " No files to download: either none found, or all found are up to date."
    else
    [[ -d downloads ]] || mkdir downloads
    for x in $download_files ; do
    failover_fetch $x ; done ; fi
    install)
    dbpath=`sed -r '/^DBPath/!d;s/^.*= //' /etc/pacman.conf`
    [[ -z $dbpath ]] && dbpath="/var/lib/pacman/"
    bugspray "dbpath: $dbpath" 2
    echo " Updating databases"
    cp -ft ${dbpath}sync/ downloads/*.db
    cachedir=`sed -r '/^CacheDir/!d;s/^.*= //' /etc/pacman.conf`
    [[ -z $cachedir ]] && cachedir="/var/cache/pacman/pkg/"
    echo " Caching packages"
    cp -f downloads/*.pkg.tar.xz $cachedir
    echo
    echo " Don't forget to install/update your packages."
    echo " Exercise proper caution."
    echo " Have fun!"
    clean)
    echo "Cleaning up. This might take a while."
    rm -fr .temp-alpps/ && echo "Buffer directory deleted" || echo "Problem deleting buffer directory '.temp-alpps/'"
    rm -fr log-alpps/ && echo "Log directory deleted" || echo "Problem deleting 'log-alpps/'"
    rm -fr downloads/ && echo "Downloaded packages deleted" || echo "Problem deleting 'downloads/'"
    echo
    echo -e " ${lgreen}Arch Linux pacman proxy script${dull}"
    echo
    echo -e " ${green}Description${dull}"
    echo -e " ${green}===========${dull}"
    echo -e " This is a bash script to fetch and install packages for an offline Arch box"
    echo " using another, online box as a proxy of sorts. So far, this only works if"
    echo " the proxy box has bash, wget, tar, sed and grep installed."
    echo " It's probably also entirely unsafe, incompatible and will destroy your box"
    echo " in a fiery blaze if you try to use it (you know the drill)."
    echo
    echo -e " ${green}Options${dull}"
    echo -e " ${green}=======${dull}"
    echo " init Step 0 (as it were): take a snapshot of your system"
    echo " fetchdb Step 1: download the packagelist database"
    echo " fetch <file> Step 2: download requested packages"
    echo " install Step 3: update your system"
    echo " clean Step 4: delete any unneeded files"
    echo
    echo " howto More detailed instructions"
    echo " bugs Problems and future plans"
    echo " faq As it says"
    echo " warranty (in case it ever becomes necessary)"
    echo " version (to be honest, I wasn't expecting to go beyond v1-rc or so)"
    echo " help You're reading it, doofus :^)"
    echo
    # dl_list Test the find_dependencies function"
    # verint Test the compare_versions function"
    esac

    AnimaInvicta wrote:
    Since my Arch box has no internet connection (yes, I'm that much of a masochist), I wrote a bash script to act as a proxy of sorts for pacman, at least as regards downloading. It took a while to get it working (intermittent web access and all) but here it finally is, as promised.
    It works well for me, and I only hope that it will help anyone else in the same situation (if there is anyone else in the same situation).
    The script has various options to explain everything you need to know, but here's a quick word of warning: it only works on POSIX-compatible computers (i.e. no Wintendows, usually) and the proxy box needs to have bash, wget, tar, grep and sed installed. I don't see this as being a problem, but if I'm wrong, tell me all about it.
    #!/bin/bash
    readonly VER="2.1"
    readonly wgetVER=`wget -V|sed '1!d'`
    # DEBUG levels:
    # Set to 0 for ALERT-level messages only
    # Set to 1 for INFO-level messages (I prefer this)
    # Set to 2 for DEBUG-level messages
    # Set to 3 for all messages
    readonly DEBUG=0
    # Set DEBUGLOG=1 to print ALERT, INFO and DEBUG messages to DEBUG.log
    readonly DEBUGLOG=0
    readonly COLOUR=true
    if [[ $COLOUR == true ]] ; then
    readonly red='\e[31m'
    readonly warn='\e[31;7m '
    readonly green='\e[32m'
    readonly lgreen='\e[32;1m'
    readonly yellow='\e[33;1m'
    readonly lblue='\e[34;1m'
    readonly dull='\e[0m' ; fi
    # Sticky details:
    # tar seems very slow (vfat? transform? USB?)
    function bugspray {
    [[ -z $2 ]] && verbosity=1 || verbosity=$2
    if (( DEBUG >= verbosity )) ; then
    (( $2 == 0 )) && intro="${warn}ALERT${dull} | "
    (( $2 == 1 )) && intro=" INFO | "
    (( $2 > 1 )) && intro=" ${yellow}DEBUG${dull} | "
    echo -e "$intro$1"
    (( DEBUGLOG == 1 )) && echo "`date +%F_%T` | $1">>log-alpps/DEBUG.log ; fi ; }
    function compare_versions {
    # Requires two ordinary, untweaked version strings, first local, second distant
    if [[ -z $2 ]] ; then
    bugspray "compare_versions didn't receive two variables." 2 ; fi
    update='no'
    [[ -z $2 ]] && return
    local localversion=(`echo $1|sed -r 's/([[:alpha:]]+)/ \1 /g;s/[\.:~_-]/ /g'`)
    local distantversion=(`echo $2|sed -r 's/([[:alpha:]]+)/ \1 /g;s/[\.:~_-]/ /g'`)
    local max=$((${#distantversion[*]}))
    bugspray "localversion: ${localversion[*]}; distantversion: ${distantversion[*]}" 2
    for (( x=0 ; (( x < $max )) ; $((x++)) )) ; do
    bugspray "local version part: `echo ${localversion[$x]}` | distant version part: `echo ${distantversion[$x]}`" 2
    if [[ `echo ${localversion[$x]}|grep -E '^[0-9]*$'` && `echo ${distantversion[$x]}|grep -E '^[0-9]*$'` ]] ; then
    bugspray "Numerical comparison" 2
    bugspray "localver (${localversion[$x]}) less than distantver (${distantversion[$x]}): $(( 10#${localversion[$x]} < 10#${distantversion[$x]} ))" 3
    # Different compare methods for numbers, single letters and multiple letters.
    if (( 10#${localversion[$x]} < 10#${distantversion[$x]} )) ; then
    update='yes'
    break ; fi ; fi
    if [[ `echo ${localversion[$x]}|grep -E '^[[:alpha:]]$'` && `echo ${distantversion[$x]}|grep -E '^[[:alpha:]]$'` ]] ; then # single letter -> compare
    bugspray "Lexicographical comparison" 2
    bugspray "localver (${localversion[$x]}) less than distantver (${distantversion[$x]}): [[ ${localversion[$x]} < ${distantversion[$x]} ]]" 3
    if [[ ${localversion[$x]} < ${distantversion[$x]} ]] ; then
    update='yes'
    break ; fi ; fi
    if [[ `echo ${localversion[$x]}|grep -E '^[[:alpha:]]+$'` && `echo ${distantversion[$x]}|grep -E '^[[:alpha:]]+$'` ]] ; then # string -> drop
    # cvs / git / beta -> what are the rules?
    bugspray "Sequence of letters. Not treating as version number." 2 ; fi
    done ; }
    function find_dependencies {
    # Determine existence via unique path
    bugspray "+ ${lgreen}Building download list for package \"$1\"${dull}" 1
    local packagename
    local dlfile
    local package_found=no
    if [[ `ls .temp-alpps/*.db/$1-* 2>/dev/null` ]] ; then
    bugspray "Analogous package-name file(s) found" 2
    for x in `ls .temp-alpps/*.db/$1-*/desc` ; do
    bugspray "Checking $x" 2
    packagename=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $x`
    if [[ j$packagename == j$1 ]] ; then
    bugspray "Exact match found: $packagename = $1" 2
    dlfile=`sed '/%FILENAME%/,+1!d;/%FILENAME%/d' $x`
    local distantversion=`sed '/%VERSION%/,+1!d;/%VERSION%/d' $x`
    local package_full=$packagename-$distantversion
    local the_repo=`echo $x|sed -r 's/.temp-alpps\/(.*)\.db.*/\1/'`
    local the_path=`echo $x|sed -r 's/desc//'`
    unplus=`echo $packagename|sed 's/\+/\\\+/g'`
    local local_version=`sed -r '/^'$unplus' /!d;s/.* //' .temp-alpps/snapshot.state`
    package_found=yes
    break ; fi ; done ; fi
    if [[ -z $dlfile ]] ; then
    bugspray "Exact match not found -> looking for replacements." 2
    if ! [[ -z `grep $1 .temp-alpps/*.db/*/depends` ]] ; then
    local provisional=`grep $1 .temp-alpps/*.db/*/depends|sed -r 's/\/depends.*//'`
    for package in $provisional ; do
    local providence=`sed -r '/%PROVIDES%/,/^$/!d;/%PROVIDES%/d;/^$/d;s/>.*//;s/=.*//' $package/depends`
    for y in $providence ; do
    if [[ j$y == j$1 ]] ; then
    # But what about when several packages provide the same thing and ALPPS picks the wrong one? Can it happen?
    local newdep=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $package/desc`
    bugspray " -> Package \"$newdep\" provides \"$1\"." 1
    find_dependencies $newdep
    break 2 ; fi ; done ; done
    if [[ -z $newdep ]] ; then
    bugspray "${warn}Warning:${dull} package \"$1\" not found in database." 0 ; fi ; fi ; fi
    bugspray "package: $1 | package_found = $package_found" 2
    # Add file to download_list if not up to date and if not already present
    if [[ j$package_found == jyes ]] ; then
    local already_got_one=no
    unplus=`echo $dlfile|sed 's/\+/\\\+/g'`
    [[ `echo $download_files|grep $unplus` ]] && already_got_one="yes" && bugspray "${green}Package in queue${dull}" 1
    [[ `ls downloads/$dlfile 2>/dev/null` ]] && already_got_one="yes" && bugspray "${green}Package proxied${dull}" 1
    compare_versions $local_version $distantversion
    bugspray "compare_versions says: $update" 2
    ! [[ -z $local_version || $update == yes ]] && already_got_one="yes" && bugspray "${green}Package already installed and up-to-date${dull}" 1
    if [[ j$already_got_one != jyes ]] ; then
    bugspray "${green}Confirm downloading${dull}" 1
    download_files+="$dlfile "
    download_array[${dlfile}]=$the_repo
    bugspray "Checking for further dependencies" 2
    if [[ -a $the_path/depends && `grep -E '^%DEPENDS%$' $the_path/depends` ]] ; then
    local dependency=`sed -r '/%DEPENDS%/d;/^$/q' $the_path/depends`
    bugspray "Dependencies of \"$packagename\":$dependency" 3
    for x in $dependency ; do
    # Is this dependency already installed? Sort-of the same as higher up; it just saves time here.
    local depname=`echo $x|sed -r 's/>.*//;s/=.*//'`
    local depminver=`echo $x|sed -r 's/.*>//'`
    bugspray "Dependency name: \"$depname\"" 2
    if ! [[ `grep -E '^$depname ' .temp-alpps/snapshot.state` ]] ; then
    find_dependencies $depname ; fi ; done
    else
    bugspray "${lblue}End of the line${dull}: package \"$packagename\" has no dependencies." 2
    true ; fi ; fi ; fi ; }
    function failover_fetch {
    echo "Downloading `echo $1|sed 's/.*\///'`"
    [[ -d log-alpps/ ]] || mkdir log-alpps/
    [[ -z $success ]] || unset success
    for mirror in $(<.temp-alpps/snapshot.mirrorlist) ; do
    # If DEBUG>0, shouldn't redirect output
    url=`echo $mirror|sed 's/$arch/'$arch'/;s/$repo/'${download_array[$1]}'/'`/$1
    bugspray "Connecting to $url" 2
    wget -o .temp-alpps/very-temp-log -U "Arch Linux Pacman Proxy Script version $VER / $wgetVER" -P downloads/ $url && success=true
    cat .temp-alpps/very-temp-log>>log-alpps/download.log
    rm -f .temp-alpps/very-temp-log
    if [[ -n $success ]] ; then
    bugspray "Download: \$success = true" 2
    break ; fi ; done
    if [[ -z $success ]] ; then
    bugspray "${warn}FAIL:${dull} $1 not accessible on known mirrors." 0 ; fi ; }
    case $1 in
    warranty)
    echo
    echo -e " ${green}Warranty${dull}"
    echo -e " ${green}========${dull}"
    echo " This program is free software. It comes without any warranty, to"
    echo " the extent permitted by applicable law. You can redistribute it"
    echo " and/or modify it under the terms of the Do What The Fuck You Want"
    echo " To Public License, Version 2, as published by Sam Hocevar. See"
    echo " http://sam.zoy.org/wtfpl/COPYING for more details."
    echo
    howto)
    echo
    echo -e " ${green}How to use ALPPS${dull}"
    echo -e " ${green}================${dull}"
    echo -e " ${yellow}+ Step 0${dull}: prime the engine"
    echo " On your offline box, copy the ALPPS script onto a removable medium, cd into"
    echo " it's directory, then run it with the \"init\" option. This essentially"
    echo " takes a snapshot of your system, package-wise. Your removable medium is"
    echo " now ready for use!"
    echo -e " ${yellow}+ Step 1${dull}:"
    echo " On the proxy box the first order of business is to download and decompress"
    echo " the current package lists. You can do this with the \"fetchdb\" option."
    echo -e " ${yellow}+ Step 1 alt${dull}:"
    echo " If you want to download the package lists without decompressing them,"
    echo " \"fetchdb simple\" will do this. It's a lot quicker, but please keep"
    echo " in mind that you cannot then do anything in step 2."
    echo -e " ${yellow}+ Step 2${dull}:"
    echo " If you want to download packages (and why wouldn't you?), the easiest way"
    echo " is to prepare a simple text file containing the names of the packages you"
    echo " want, one on each line. Run ALPPS with the option \"fetch <filename>\" and"
    echo " sit back and wait until it's done. Don't worry about dependencies: ALPPS"
    echo " handles them automatically."
    echo -e " ${yellow}+ Step 2 alt${dull}:"
    echo " As a convenience, \"fetch full\" will download all the packages needed to"
    echo " update the offline box."
    echo -e " ${yellow}+ Step 3${dull}:"
    echo " Finally, back on your offline box, run ALPPS again with the \"install\""
    echo " option. This will update the package list and copy the package files into"
    echo " local cache. You can now run \"pacman -S <package names>\" to finish"
    echo " installing the packages."
    # ALPPS no longer installs the packages, just caches them locally.
    # Not entirely sure why; it just felt too klutzy.
    echo -e " ${yellow}+ Step 4${dull}:"
    echo " You will now probably want to delete all the stuff you no longer need. Run"
    echo " ALPPS with the option \"clean\". This won't touch your request file(s). It"
    echo -e " ${red}WILL${dull} delete log files, so if you want to keep them, back them up first."
    echo " Next time you do this, don't forget to run ALPPS with \"init\" again."
    echo
    bugs)
    echo
    echo -e " ${green}Where this goes wrong${dull}"
    echo -e " ${green}=====================${dull}"
    echo " + ALPPS is a bit slow when packages have many dependencies. It's a recursive"
    echo " shell script: what did you expect?"
    echo " + It only uses the settings in /etc/pacman.conf. If your conf file is"
    echo " elsewhere, you're SOL. Similarly, the repositories are all taken from"
    echo " /etc/pacman.d/mirrorlist. If you added any custom repositories in"
    echo " /etc/pacman.conf (or any other file), ALPPS ignores them."
    echo " + As it stands, ALPPS only works when the proxy box has bash, wget, sed,"
    echo " grep and tar installed. The offline box needs bash, pacman and sed (in"
    echo " theory, this shouldn't be a problem...)."
    echo " + There is as yet no way of handling package groups, short of listing every"
    echo " member of the group."
    echo " + I don't think ALPPS will ever be able to handle AUR packages. Of course, if"
    echo " you're compiling AUR packages, you probably won't need something like this!"
    echo
    faq)
    echo
    echo -e " ${green}Frequently Asked Questions${dull}"
    echo -e " ${green}==========================${dull}"
    echo
    echo -e " ${red}Q:${dull} Can I run the whole thing off a USB stick?"
    echo -e " ${lblue}A:${dull} Certainly."
    echo
    echo -e " ${red}Q:${dull} Can I use a non-POSIX computer as a proxy (e.g. Windows)?"
    echo -e " ${lblue}A:${dull} Probably not, unless that computer has a POSIX-compatibility layer"
    echo " installed (such as Cygwin) with bash, wget, tar, sed and grep."
    echo
    echo -e " ${red}Q:${dull} Do I need to download the package list, waste time updating my computer,"
    echo " then go back again to download the packages I want?"
    echo -e " ${lblue}A:${dull} Nope! You can update the packagelist database and download piping-hot"
    echo " fresh packages, all in one sitting."
    echo -e " ${red}Q:${dull} You mean I won't have to futz around with package lists that keep updating"
    echo " ten minutes after I download them?"
    echo -e " ${lblue}A:${dull} Exactly. Nice, isn't it?"
    echo
    echo -e " ${red}Q:${dull} Does this thing handle SSL and signed packages?"
    echo -e " ${lblue}A:${dull} ALPPS uses SSL if:"
    echo " - the mirror has an https address (at present, none do), and"
    echo " - wget on the proxy box is compiled with SSL support"
    echo " Concerning signed packages: no, but then again, it doesn't need to. ALPPS"
    echo " downloads packages; it's pacman's responsibility to verify them. Your"
    echo " system remains safe (or as safe as it ever was, at any rate)."
    echo -e " ${red}Q:${dull} What about gpg keys? I need to get them."
    echo -e " ${lblue}A:${dull} ...maybe later, say, in version 3."
    echo
    echo -e " ${red}Q:${dull} ALPPS says it \`prepares databases´. Can pacman still use them after this?"
    echo -e " ${lblue}A:${dull} Yes, it can. In fact, what ALPPS does is extract the databases into a"
    echo " temp directory, without altering the original .db files."
    echo
    echo -e " ${red}Q:${dull} Where can I contact you?"
    echo -e " ${lblue}A:${dull} For constructive, useful questions and comments: [email protected] and"
    echo " be sure to mention Arch Linux in the subject."
    echo " For flames, trolling, spam and the like, visit your local bitbucket."
    echo
    todo)
    echo
    echo -e " ${green}What's next?${dull}"
    echo -e " ${green}============${dull}"
    echo -e " + I ${red}might${dull} be able to extend the reach of this thing to the AUR."
    echo " Yes, I know I said ALPPS couldn't (in \"bugs\"), but I've learned"
    echo " something new since then. It'll be tricky, though, since the AUR web"
    echo " interface delivers results in python. While this should be a Good Thing,"
    echo " bash isn't very good at handling python-format lists and dicts."
    echo
    -v|ver|version|--ver|--version)
    echo -e "${lgreen}Arch Linux pacman proxy script${dull} | ${yellow}version $VER${dull}"
    dl_list) # Debugging
    (( DEBUG == 0 )) && echo "the \"dl_list\" option is only for debugging" && exit 0
    arch=$(<.temp-alpps/snapshot.architecture)
    unset download_files
    unset download_array
    declare -A download_array
    find_dependencies $2
    bugspray "Download list: $download_files" 3
    echo "Download list v2:"
    for x in $download_files ; do
    bugspray " File \"$x\" from repo \"${download_array[$x]}\"" 3
    echo " Full URL: http://mirror.archlinux.org/${download_array[$x]}/os/$arch/$x" ; done
    verint) # Debugging
    (( DEBUG == 0 )) && echo "the \"verint\" option is only for debugging" && exit 0
    for x in `ls .temp-alpps/*/$2-*/desc` ; do
    packagename=`sed -r '/%NAME%/,+1!d;/%NAME%/d' $x`
    if [[ j$packagename == j$2 ]] ; then
    bugspray "Unique package-name file found: $packagename=$2" 2
    distantversion=`sed '/%VERSION%/,+1!d;/%VERSION%/d' $x`
    dlfile=`sed '/%FILENAME%/,+1!d;/%FILENAME%/d' $x`
    package_full=$packagename-$distantversion
    the_repo=`echo $x|sed -r 's/.temp-alpps\/(.*)\.db.*/\1/'`
    the_path=`echo $x|sed -r 's/desc//'`
    local_version=`sed -r '/^'$packagename' /!d;s/.* //' .temp-alpps/snapshot.state`
    break ; fi ; done
    echo "full package filename: $dlfile"
    echo "Comparing local ($local_version) and distant ($distantversion) versions of $2..."
    compare_versions $local_version $distantversion
    #compare_versions 2.5beta3-2 2.5cvs4-1
    echo "...and the verdict is: $update"
    init)
    x=`uname -m`
    if [[ -x /usr/bin/pacman ]] ; then
    [[ -d .temp-alpps ]] || mkdir .temp-alpps/
    pacman -Q>.temp-alpps/snapshot.state
    sed -r '/^Se/!d;s/Server = //' /etc/pacman.d/mirrorlist>.temp-alpps/snapshot.mirrorlist
    sed -r '/^\[/!d;/options/d;s/\[(.*)\]/\1/' /etc/pacman.conf>.temp-alpps/snapshot.repositories
    sed -r '/^Architecture/!d;s/^.*= //' /etc/pacman.conf>.temp-alpps/snapshot.architecture
    [[ ! -s .temp-alpps/snapshot.architecture || auto == $(<.temp-alpps/snapshot.architecture) ]] && $x>.temp-alpps/snapshot.architecture
    sed -r '/^SyncFirst/!d;s/.*= //;s/ /\n/g' /etc/pacman.conf>.temp-alpps/snapshot.prioritypackages
    echo "Current state recorded."
    else
    echo "You seem to be running ALPPs on an unsupported system."
    echo "ALPPS is the ${lgreen}Arch Linux Pacman Proxy Script${dull} and simply"
    echo "won't run properly on a non-pacman OS (except when proxying)."
    echo "Aborting. Sorry."
    exit 1 ; fi
    fetchdb)
    [[ -d downloads ]] || mkdir downloads
    arch=$(<.temp-alpps/snapshot.architecture)
    declare -A download_array
    for repo in $(<.temp-alpps/snapshot.repositories) ; do
    download_array[${repo}.db]=$repo
    location="${repo}.db"
    failover_fetch $location ; done
    if [[ j$2 != jsimple ]] ; then
    [[ -d log-alpps ]] || mkdir log-alpps
    [[ -a syncfirst ]] && rm -f syncfirst
    echo "Preparing databases for local processing. This might take a while."
    for x in $(<.temp-alpps/snapshot.repositories) ; do
    echo "Preparing $x.db"
    if [[ -a downloads/$x.db ]] ; then
    [[ -d .temp-alpps/$x.db ]] || mkdir .temp-alpps/$x.db/
    tar -xzC .temp-alpps/$x.db/ -f downloads/$x.db --transform 's/:/§/' --no-same-owner && echo "$x database ready for use."
    else
    echo -e "Database $x.db is missing. Skipping. This will probably cause problems." ; fi ; done
    # SyncFirst package warning
    [[ -z $download_list ]] || unset download_list
    [[ -a syncfirst ]] && rm -f syncfirst
    for x in $(<.temp-alpps/snapshot.prioritypackages) ; do
    find_dependencies $x ; done
    bugspray "download_files: $download_files" 2
    if [[ ! -z $download_files ]] ; then
    echo "New version(s) of SyncFirst package(s):"
    for x in $(<.temp-alpps/snapshot.prioritypackages) ; do
    [[ ! -z `echo $download_files|grep $x` ]] && echo "- $x" && echo $x>>syncfirst ; done
    echo "Package names placed in 'syncfirst'. Don't forget to download them!" ; fi ; fi
    fetch)
    for x in $(<.temp-alpps/snapshot.repositories) ; do
    if ! [[ -d .temp-alpps/$x.db/ ]] ; then
    bugspray "You must first download a fresh database with the \"fetchdb\" option" 0
    exit 1 ; fi ; done
    arch=$(<.temp-alpps/snapshot.architecture)
    unset download_array
    declare -A download_array
    unset download_files
    if [[ $2 == full ]] ; then
    echo " Building full upgrade list. This will almost certainly take a while."
    echo " Please wait..."
    for y in `sed -r 's/^(.*) .*/\1/' .temp-alpps/snapshot.state` ; do
    bugspray "Examining $y" 1
    find_dependencies $y ; done
    elif [[ -a $2 ]] ; then
    echo " Determining dependencies. This might take a while. Please wait."
    for y in $(<$2) ; do
    bugspray "Examining $y" 1
    find_dependencies $y ; done
    else
    echo " Error: you should provide a list-file or the keyword \"full\"."
    echo " (see 'alpps.sh howto', step 2)"
    exit 1 ; fi
    if [[ -z $download_files ]] ; then
    echo " No files to download: either none found, or all found are up to date."
    else
    [[ -d downloads ]] || mkdir downloads
    for x in $download_files ; do
    failover_fetch $x ; done ; fi
    install)
    dbpath=`sed -r '/^DBPath/!d;s/^.*= //' /etc/pacman.conf`
    [[ -z $dbpath ]] && dbpath="/var/lib/pacman/"
    bugspray "dbpath: $dbpath" 2
    echo " Updating databases"
    cp -ft ${dbpath}sync/ downloads/*.db
    cachedir=`sed -r '/^CacheDir/!d;s/^.*= //' /etc/pacman.conf`
    [[ -z $cachedir ]] && cachedir="/var/cache/pacman/pkg/"
    echo " Caching packages"
    cp -f downloads/*.pkg.tar.xz $cachedir
    echo
    echo " Don't forget to install/update your packages."
    echo " Exercise proper caution."
    echo " Have fun!"
    clean)
    echo "Cleaning up. This might take a while."
    rm -fr .temp-alpps/ && echo "Buffer directory deleted" || echo "Problem deleting buffer directory '.temp-alpps/'"
    rm -fr log-alpps/ && echo "Log directory deleted" || echo "Problem deleting 'log-alpps/'"
    rm -fr downloads/ && echo "Downloaded packages deleted" || echo "Problem deleting 'downloads/'"
    echo
    echo -e " ${lgreen}Arch Linux pacman proxy script${dull}"
    echo
    echo -e " ${green}Description${dull}"
    echo -e " ${green}===========${dull}"
    echo -e " This is a bash script to fetch and install packages for an offline Arch box"
    echo " using another, online box as a proxy of sorts. So far, this only works if"
    echo " the proxy box has bash, wget, tar, sed and grep installed."
    echo " It's probably also entirely unsafe, incompatible and will destroy your box"
    echo " in a fiery blaze if you try to use it (you know the drill)."
    echo
    echo -e " ${green}Options${dull}"
    echo -e " ${green}=======${dull}"
    echo " init Step 0 (as it were): take a snapshot of your system"
    echo " fetchdb Step 1: download the packagelist database"
    echo " fetch <file> Step 2: download requested packages"
    echo " install Step 3: update your system"
    echo " clean Step 4: delete any unneeded files"
    echo
    echo " howto More detailed instructions"
    echo " bugs Problems and future plans"
    echo " faq As it says"
    echo " warranty (in case it ever becomes necessary)"
    echo " version (to be honest, I wasn't expecting to go beyond v1-rc or so)"
    echo " help You're reading it, doofus :^)"
    echo
    # dl_list Test the find_dependencies function"
    # verint Test the compare_versions function"
    esac
    I've always resorted to use VPN, then I started using cntlm, this looks very useful (and a lot of work on your part!) Thanks alot!
    DoctorZeus

  • Arch Linux running on Asus Transformer T100/T100TA... sort of.

    I'm not really asking for help here (can't find an appropriate place to put this post), but more to show off my accomplishment with this tablet.
    As the thread title says, I've gotten Arch Linux to run on the Asus T100TA which is a quite annoying little thing. I haven't documented the steps myself, however, I remember exactly what I have done, and in order to get the live image to at least run on this tablet, here are the steps I did:
    (you'll maybe need 2 USB drives, seems to be the easiest way)
    1. Create an ISO using the archiso set as you normally would (except you won't really need the ISO itself) OR if you can figure it out yourself, install the base image to the USB drive (either architecture will do, but I recommend i686 since the processor is 32 bit as well)
    https://wiki.archlinux.org/index.php/Archiso
    This step will be unnecessary as of May, as the live images onwards on the main download site will already contain the 3.14 or newer kernels.
    2. After the image building successfully finishes, copy all the contents from (PROFILE)/work/iso/ (except root-image squashfs files) to a FAT32 formatted USB drive (1). This is to simply create a bootloader drive that will allow us for later swapping the USB drives.
    3. Download an ia32 version of grub. Any will do as long as it can boot up on the tablet.
    http://www.supergrubdisk.org/category/download/supergrub2diskdownload/
    This one works, download the standalone IA-32/i386 EFI and paste it in (USB Drive (1))/EFI/boot/bootia32.efi .
    (use latest versions, no matter if it's unstable)
    4. Now you need to make a grub.cfg. The one I made looks like this
    menuentry 'Arch Linux i686'{
    echo 'Loading Linux core repo kernel ...'
    linux /arch/boot/i686/vmlinuz noefi nomodeset archisobasedir=arch archisolabel=ARCH_201404
    echo 'Loading initial ramdisk ...'
    initrd /arch/boot/i686/archiso.img
    menuentry 'Arch Linux x86_64'{
    echo 'Loading Linux core repo kernel ...'
    linux /arch/boot/x86_64/vmlinuz noefi nomodeset archisobasedir=arch archisolabel=ARCH_201404
    echo 'Loading initial ramdisk ...'
    initrd /arch/boot/x86_64/archiso.img
    NOTE: If you're using a later live image build, I advise to change the date accordingly. It's not necessary to do so, since the mount by label doesn't work, however, I like to keep everything intact.
    noefi flag seems unnecessary as well, though I have added it to prevent some kernel panics from happening, for just in case. It works without it, still, however you need the nomodeset flag or else you'll get a black screen!
    I'm not entirely sure where the grub.cfg goes, but I've put it in USB Drive(1)/boot/grub/ , /EFI/grub/ and in /EFI/boot/grub/ just to make it sure that it works.
    5. Create an ext2/3/4 (recommended ext2 for flash drives, not to wear it out) USB drive (2) and copy the arch folder to the root of the USB drive (2)
    ---- BOOT PROCESS ----
    Before this step, ensure that Secure Boot is set to OFF in the Aptio setup. Otherwise it will throw up an error in a red box crying it's not signed.
    6. Plug in the USB drive (1) into a USB port and while powering on the tablet, tilt the escape key to pop up a boot menu.
    7. Select UEFI: (your USB drive (1))
    8. GRUB 2 will pop up. If you're running the SuperGrubDisk version, you're gonna have to go to Everything and then scroll down until it says something like
    (hd0, msdos1)/boot/grub/grub.cfg
    and click on it to open the configuration data manually created.
    9. Simply select your desired version of Arch Linux live distro to boot.
    10. VOILAaa, not really... It'll pop up with a mount error saying it's a wrong FS to mount. This is where you plug in your USB drive (2) in place of the first one.
    11. Type in:
    # mount /dev/sda1 /run/archiso/bootmnt
    # exit
    12. Congratulations, you're running Arch Linux on your ASUS Transformer T100TA tablet!
    This is as far as I have went into running it. Installing it on a HDD would require mounting the mmcblk partitions, which I haven't looked into yet. For a start, I'd just recommend installing it on a USB drive, though you'd have to own one of the USB OTG converters or a USB hub. The screen is spammed with the mmcblk0rpmb timeout errors though and that is annoying. It stops after a while when it stops trying. Reboot doesn't work either, seems like acpi is broken.
    You could do it with a single usb drive, though it requires some knowledge of this tablet's EFI because it disallowed me from running a kernel on another partition other than FAT32. Grub pops up with an error:
    can't unload EFI services
    or something like that.
    I've also tried putting the USB Drive (2) in during grub and it pops up with an error with invalid sector sizes. That was to be expected.
    btw I know it's my first post, I'm just here to share this with you. I never had the need to ask for help but when absolutely necessary.
    PICS OF IT RUNNING
    Some USB devices aren't visible, like the camera.
    A custom partition layout without the recovery partitions. Yours may differ.
    Last edited by xan1242 (2014-04-13 22:54:46)

    I haven't tried much other than getting this live image to run on this machine. I'll attempt to install the base image using my desktop computer with the appropriate drivers and see how that goes. (or just install the wifi driver)
    That guy really made it to work much better than I imagined it to work at all! I'll see what can be done using the same drivers, though running Ubuntu seems tempting as well. He even got the touchscreen to work, which is really awesome. It seems that he also merged the drivers into the kernel image, which is going to be a challenge in Arch.
    Since he's using the 64 bit build of Ubuntu, I'll try it with x86_64 Arch as well to try and use his guide to make the drivers to work.
    EDIT: I have successully installed the base to an external drive and booted it on the tablet, however since the base was installed externally on another machine, I need to regenerate initrd. It boots on the fallback ramdisk, but still no wifi and the screen is spammed even more with the timeout errors. I've seen topics on Raspberry Pi having a similar issue and that it was repaired using some kernel flags, but I am not sure if those will work with the tablet. Also, using the bootflags jfwells used on Ubuntu work here as well, and gives full resolution output now. Wifi doesn't work. ip link doesn't give any signs of a wifi card present.
    EDIT2: Got Arch up and running relatively nicely on the tablet now. Though it is in the same state as the last edit in terms of functionality, it works I'd say well enough to be considered usable. I couldn't make the wireless card to work, for some strange reason, so I got a RT73 USB card (Edimax EW-7318USg to be precise, had to use 2 USB ports) and installed stuff on to the tablet. I ran X without a desktop manager, and the X apps worked fine, even with the touch screen (emulating a mouse, no right click) and I ran XFCE4 on it without a problem (with compositing).
    It simply needs more developed drivers on it, that's mostly it. The state is exactly the same as Ubuntu 14.04 that jfwells made to work (minus the wifi). I haven't played with the sound, either, due to the warning he posted, but I believe it works as it does in Ubuntu.
    The steps I made are as follows:
    1. Simply made another live ISO with the archiso set
    2. dd'd the image to a USB drive
    3. On the second USB drive I created two GPT partitions (200 - 300 MB for ESP, everything else ext2)
    4. Booted the live archiso USB drive
    5. Installed the base to the second USB drive while being mounted like this: ext2 partition -> /mnt and ESP -> /mnt/boot
    6. Installed GRUB x86_64-efi to simply generate a configuration
    7. Installed wireless utilities as well as everything else needed to make it to work
    8. To ensure bootability on the tablet, again, I put the IA32 GRUB to the ESP in /EFI/boot/bootia32.efi
    9. I have edited the grub.cfg, can't exactly remember with what, but this is what it looks like
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-(hd0,gpt2)' {
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,gpt1'
    echo 'Loading Linux core repo kernel ...'
    linux /vmlinuz-linux root=/dev/sda2 video=VGA-1:1368x768e reboot=pci,force sdhci.debug_quirks=0x8000 rw quiet
    echo 'Loading initial ramdisk ...'
    initrd /initramfs-linux.img
    menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-(hd0,gpt2)' {
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,gpt1'
    echo 'Loading Linux core repo kernel ...'
    linux /vmlinuz-linux root=/dev/sda2 video=VGA-1:1368x768e reboot=pci,force sdhci.debug_quirks=0x8000 rw quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-fallback.img
    ### END /etc/grub.d/10_linux ###
    I simply added the kernel flags jfwells added. It needs that root flag, or else it will not boot. I can't figure out the UUIDs though. It will reboot, but it will not shut down.
    10. Boot up your second USB drive on the tablet and... IMPORTANT - Boot with the fallback ramdisk - or else you're going to experience non functional input
    11. After booting it, you'll get the annoying mmcblk timeout spamming the screen. I haven't figured out how to fix it, but to hide it, type in
    # dmesg -n 1
    12. Generate another ramdisk (forgot the command, but search function should serve you)
    13. Reboot with the normal ramdisk now.
    14. After setting up the wireless connection, rock on with the pacman!
    At this point I installed a bunch of stuff, like Intel GPU drivers, xorg, xfce4, ntfs-3g, gparted,  and among other stuff I personally test stuff with.
    I couldn't mount the mmcblk partitions to at least somehow be able to edit data on the Windows partitions or the disk as a whole.
    Anybody willing to help getting Arch to run on this tablet is welcome.
    EDIT3: Internal WiFi working! Simply added "sdhci.debug_quirks=0x8000" flag.
    Last edited by xan1242 (2014-04-13 23:35:26)

  • Arch linux for SPARC, is there still any activity?

    Hello all,
    I just got my hands on some sparc servers and I'd love to put arch linux on there.
    I found a wiki-page about SPARCH, but the last real edit is over 2 years ago, and the repository is down.
    Is anyone still interested in this / working on this?
    Ward

    Ok, so Dave replied.
    It's been a while since he worked with the SPARC version, and can't find the files anymore.
    However, he does have some very useful basic information regarding what the basic problems with the porting process were, the framework he used (Cross-LFS; http://trac.cross-lfs.org/) and so on. Dave also mentioned, it was far faster to do the compiling on his x86 desktop than the actual SPARC box.
    I'm highly motivated in getting something done about porting Arch to SPARC. Haven't done anything quite like this before, but that's not a problem. Lack of time might be though, which is why I'm hereby announcing I'm looking for volunteers to participate in a group effort to get the porting moving along and fully available to the public as soon as possible.
    What I can offer is this:
    - Server space from a fast x86_64 Sun Blade (running Arch) to host repositories and possibly do some compiling as well; 1 gbit uplink
    - A Sun Fire V240 with 2 CPUs (1.5 GHz if I remember right) and 4 GB RAM for compiling / testing
    - A plan, lots of ideas, an open mind and skills in areas such as design & co-operation
    I would love to get involved in the actual porting myself as well, but as things look at the moment, I will only have the chance to do so occasionally and for short periods of time.
    I can and very much wish to participate in designing the whole process though, and the first couple of people I feel the project needs would be designers / project leaders as well. Someone(s) with previous experience in porting any OS to any new architecture would be useful to say the least.
    I'm also seriously thinking about kind of combining OpenBSD and / or DragonFly BSD with some parts of Arch. Can't really say which would be the dominating "gene" but Pacman and the rolling release approach are one of the key points of the whole thing. I used OpenBSD for years and loved it for its security and stability, but keeping it up to date and clean (no old libraries around etc.) means you will have to re-install it once a year. I got so tired of that I could simply not go on, and after lots of research ended up with Arch - which I love, apart from the fact that some things keep changing so radically that it's easy to drop out of the smooth upgrade track and get your otherwise super-stable server messed up.
    So, this secondary plan of mine has to do with taking the best parts of OpenBSD, DragonFly and Arch, and putting it all together in a way that provides a super-stable, secure and KISS distribution heavily targeted at the server scene, possibly being available as 64-bit only. If it's based on Linux kernel then it will have things such as GRSecurity installed and on by default. Server software packages designed to be chrooted (or at least providing a chrooted version) whenever possible, and so on. Clear, unified way of how the system is configured and how the init works - this is where I'm thinking about the Arch way again. I am leaning towards using the OpenBSD kernel but importing lots of stuff from Arch / Linux.
    If anyone's interested in either of these little projects, please pm or e-mail me at jyri (ät) archlinux (punkt) fi

  • Slackware TGZ to Arch Linux Package Converter

    I have two programs that interest me (LilyPond and Battle for Wesnoth) that don't have Arch Linux packages and compiling them would involve hunting everywhere for obscure dependencies (LilyPond in particular) so I just downloaded the Slackware packages, inspected them and found that by unzipping them onto the root folder (as superuser) and running the install script (if there is one) I can get them to run with minimal fuss.
    Has the idea of making a Slackware to Arch package converter been brought up before? Is there any problems with this? (Slackware is i386-optimised if I remember correctly, but I think it's still worth it since there is more Slackware packages than Arch Linux ones out there.)

    i3839 wrote:Flames?? Where? You sure you didn't misread something?
    Probably.
    Here's what I read, admitting that it doesn't seem quite as bad the second time around...:
    Oh? All I was hearing is that Arch already has enough packages, and that the devs are overloaded and almost down.
    "you don't know which way is up, you contradict yourself while continuing to ignore the problems and aren't fixing anything".
    Also getting custom packages into Arch's official repository seems a bit hard currently, not to mention that it's totally unclear how to do that (drop it in incomming and wait a year? Lotto?).
    "The system isn't working and you haven't done anything to try to fix it. I haven't read or noticed any of the threads illustrating that this topic has been argued to death and isn't going unnoticed"
    Maintaining packages is the most work, and every distro maintains the same packages over and over again. Tell me why to not use good, working packages from another sane distro?
    "The other distros are better."
    (Personally, I don't care if anybody likes another distro better, but if so, use it instead, don't talk about it)
    Changing GCC often gives the same problem as updating to new major libraries. Simply leave the old GCC libs or make a seperate package for them. Currently it's rather impossible in Arch to install new packages with an outdated system, if that's solved then it's also easy to use Slackware packages.
    "The Arch philosophy of keeping packages stable but up to date is just plain wrong.  I don't bother to pacman -Syu before I mention problems."
    Of course if would be best if there was a nice, good binary package standard that works on all distros, so that the application makers can make and maintain the packages themselves, but that's utopia (paths are too often hardcoded for instance).
    "hey, I do have some good ideas".
    It isn't a matter of being able to do something or not, it's a matter of convenience. All programs should be relative easy to compile from source, but that doesn't mean that everyone should compile all programs themselves.
    "There aren't enough Arch binaries to go around"
    OR:
    "ABS sucks"
    OR:
    "Hold my hand, I can't compile."
    OR:
    "I use Arch cause I don't like Gentoo". :-D 
    Yeah, some of that is a little (or quite, or even very) harsh, you can blame it on me rather than taking it to heart.
    As for the slackware packages issue, I'm personally not writing a script to convert them; I've never used slackware in my life. The idea has merit, but I get tired of people discussing pros and cons and not doing anything. I think that's because I'm about as bad as anyone on that front, possibly worse.
    Dusty

  • Announcing some new Arch Linux Schwag offerings

    Hey All,
    I wanted to introduce you to some new Arch Linux Schwag offerings I've been cooking up over the past little while.
    I'm currently sold out of case badges, and Simo has faithfully shipped his last order.  I'm trying to think of a way to compensate him, he's done so much work for me on the shipping front and all I ever offered him was dinner, (granted, he's a starving student, and dinner was hopefully much appreciated).  When I reorder stickers, probably in the new year, I will be shipping them myself, from Canada, so domestic prices will be a touch higher.
    Now, onwards to Schwag:
    It's no secret that I'm the odd man out on the tacos vs poutine debate.  I know you all will come around to my way of thinking eventually, but in the meantime, check out the new schwag where you can proudly pick your piece.  I've also added a few other new t-shirt design, mostly as your suggestions.  Check out the new products line at zazzle to place your order:
    http://www.zazzle.com/archlinux/gifts?c … 1284817680
    I think most of you know about the laptop bags, jewellery, and case badges (currently out of stock) selling at: http://schwag.archlinux.ca/
    I've added a few handmade items of my own invention to the mix, including wooden and soapstone sculptures, keychains, and coasters, all featuring our favourite distro's logo:
    http://schwag.archlinux.ca/product/coaster/
    http://schwag.archlinux.ca/product/soapstone_sculpture/
    http://schwag.archlinux.ca/product/sculpture/
    http://schwag.archlinux.ca/product/keychain/
    I'm particularly proud of the soapstone sculptures, they look incredible.  I'm not sure I can give them up.  The keychains will also make great stocking stuffers this Christmas season, so remind your friends to shop Arch Schwag!
    In addition, I would like to announce a preview of the Arch Linux Handbook.  This should be retailing in a couple weeks, and will be available from both CreateSpace and Amazon.com.  The handbook is basically a quick restyling of the epic beginner's guide in the wiki.  You can preview it here:
    https://www.createspace.com/3398103
    That's all for now!
    Dusty

    Runiq wrote:Cool stuff. Like the coasters, and the allanbrokeit shirt is stylish.
    That's Acecero's contribution, as he implies. :-)
    Also, there's a typo in the handbook's headline: "A simple lightweight Linuk handbook."
    Yeah, I know... sadly, I didn't notice it until it was too late to change (the book was set up for publication).  Now I have to wait for a new edition, or pay $40 to put one out now.
    Acecero wrote:Just curious, are you going to release different editions of the Arch Linux Handbook from time to time? I'm assuming the information would need to be updated and the more marketability you will gain anyway.
    I'm hoping to sell between 10 and 50 copies of this edition to pay for the upfront costs before making a new edition.  The more popular it is, the more likely I will be to keep it up to date.
    BTW, if anyone is interested in doing cover art for the second edition, get in touch with me.  I've been told that this cover looks like ass (it was gently, with links to tutorials on design :-D)
    Dusty

  • HP DV6000 randomly freezing with Arch Linux

    Hello,
    Just to clarify I am working with Arch Linux as a Web Developer, therefore I do have special needs such as having 20+ tabs open with vital information in different pages.
    I can assure that after using Windows XP, Windows 7, xUbuntu, Linux Mint and Ubuntu I have never had such breaks or freezes in this machine.
    The freezes are identifiable when the mouse seems to be very slow to move, the computer very slow to respond, the cursor of the icon does not change within the context where it is, I can't even open the menu bar to access the terminal (using Terminator).
    After noticing these randomly freezes, I've started to keep the Terminator open with top command inserted. After seeing the values of percentage usage in CPU or RAM, the levels don't even go up more than 20%. However, I notice that the laptop suddenly starts heating a lot.
    The solution is just to wait with some luck about 10 minutes. If it does not go on after that, I need to turn off the computer by pressing the button or unplugging the battery (yeah, the battery is dead too).
    Some main packages I currently use are:
    - Cinnamon
    - Filezilla
    - Netbeans PHP IDE 8.0
    - Skype
    - Geany
    - 7-Zip FM
    - Adobe Flash Player
    - Chromium (my main browser)
    - Firefox
    - SSH
    - Htop
    - VLC Media Player
    - Terminator
    Any ideas of what could it be?
    Thanks!
    Last edited by SirPereira (2014-05-19 14:52:56)

    Rexilion wrote:
    It seems you do not have any swap. Correct?
    Could you provide the output of dmesg after the occurance?
    Yes, you are correct, I do not have any swap. Would I benefit from it? I guess I never used it.
    After the occurance you mean, after the freeze? I will try to do it, but it is rare the case when the computer is able to not freeze at all.
    Got it now:
    The output of dmesg:
    [ 0.443614] pcieport 0000:00:1c.3: irq 43 for MSI/MSI-X
    [ 0.443838] pcieport 0000:00:1c.4: irq 44 for MSI/MSI-X
    [ 0.444061] pcieport 0000:00:1c.5: irq 45 for MSI/MSI-X
    [ 0.444184] pcieport 0000:00:01.0: Signaling PME through PCIe PME interrupt
    [ 0.444187] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
    [ 0.444190] pcie_pme 0000:00:01.0:pcie01: service driver pcie_pme loaded
    [ 0.444210] pcieport 0000:00:1c.0: Signaling PME through PCIe PME interrupt
    [ 0.444213] pci 0000:02:00.0: Signaling PME through PCIe PME interrupt
    [ 0.444217] pcie_pme 0000:00:1c.0:pcie01: service driver pcie_pme loaded
    [ 0.444237] pcieport 0000:00:1c.1: Signaling PME through PCIe PME interrupt
    [ 0.444239] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
    [ 0.444243] pcie_pme 0000:00:1c.1:pcie01: service driver pcie_pme loaded
    [ 0.444266] pcieport 0000:00:1c.3: Signaling PME through PCIe PME interrupt
    [ 0.444271] pcie_pme 0000:00:1c.3:pcie01: service driver pcie_pme loaded
    [ 0.444290] pcieport 0000:00:1c.4: Signaling PME through PCIe PME interrupt
    [ 0.444293] pci 0000:06:00.0: Signaling PME through PCIe PME interrupt
    [ 0.444295] pci 0000:06:00.1: Signaling PME through PCIe PME interrupt
    [ 0.444297] pci 0000:06:00.2: Signaling PME through PCIe PME interrupt
    [ 0.444298] pci 0000:06:00.3: Signaling PME through PCIe PME interrupt
    [ 0.444300] pci 0000:06:00.4: Signaling PME through PCIe PME interrupt
    [ 0.444305] pcie_pme 0000:00:1c.4:pcie01: service driver pcie_pme loaded
    [ 0.444324] pcieport 0000:00:1c.5: Signaling PME through PCIe PME interrupt
    [ 0.444329] pcie_pme 0000:00:1c.5:pcie01: service driver pcie_pme loaded
    [ 0.444345] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
    [ 0.444364] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
    [ 0.444399] intel_idle: does not run on family 6 model 23
    [ 0.444441] GHES: HEST is not enabled!
    [ 0.444500] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [ 0.444971] Linux agpgart interface v0.103
    [ 0.445012] rtc_cmos 00:03: RTC can wake from S4
    [ 0.445141] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
    [ 0.445167] rtc_cmos 00:03: alarms up to one month, 242 bytes nvram, hpet irqs
    [ 0.445178] ledtrig-cpu: registered to indicate activity on CPUs
    [ 0.445322] TCP: cubic registered
    [ 0.445446] NET: Registered protocol family 10
    [ 0.445656] NET: Registered protocol family 17
    [ 0.445905] registered taskstats version 1
    [ 0.446529] Magic number: 14:681:877
    [ 0.446613] rtc_cmos 00:03: setting system clock to 2014-05-20 08:51:33 UTC (1400575893)
    [ 0.446705] PM: Hibernation image not present or could not be loaded.
    [ 0.447929] Freeing unused kernel memory: 1120K (ffffffff818d8000 - ffffffff819f0000)
    [ 0.447931] Write protecting the kernel read-only data: 8192k
    [ 0.450553] Freeing unused kernel memory: 904K (ffff88000151e000 - ffff880001600000)
    [ 0.451721] Freeing unused kernel memory: 416K (ffff880001798000 - ffff880001800000)
    [ 0.458667] random: systemd-tmpfile urandom read with 2 bits of entropy available
    [ 0.460077] systemd-udevd[47]: starting version 212
    [ 0.478236] i8042: PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:MOUE] at 0x60,0x64 irq 1,12
    [ 0.489263] ACPI: bus type USB registered
    [ 0.489293] usbcore: registered new interface driver usbfs
    [ 0.489304] usbcore: registered new interface driver hub
    [ 0.494274] sdhci: Secure Digital Host Controller Interface driver
    [ 0.494278] sdhci: Copyright(c) Pierre Ossman
    [ 0.494499] sdhci-pci 0000:06:00.1: SDHCI controller found [197b:2382] (rev 0)
    [ 0.494708] mmc0: SDHCI controller on PCI [0000:06:00.1] using DMA
    [ 0.494739] sdhci-pci 0000:06:00.2: SDHCI controller found [197b:2381] (rev 0)
    [ 0.494796] sdhci-pci 0000:06:00.2: Refusing to bind to secondary interface.
    [ 0.499195] usbcore: registered new device driver usb
    [ 0.499671] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 0.499940] uhci_hcd: USB Universal Host Controller Interface driver
    [ 0.500201] ehci-pci: EHCI PCI platform driver
    [ 0.500769] uhci_hcd 0000:00:1a.0: UHCI Host Controller
    [ 0.500777] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 1
    [ 0.500786] uhci_hcd 0000:00:1a.0: detected 2 ports
    [ 0.500808] uhci_hcd 0000:00:1a.0: irq 16, io base 0x000080e0
    [ 0.501200] hub 1-0:1.0: USB hub found
    [ 0.501209] hub 1-0:1.0: 2 ports detected
    [ 0.501580] uhci_hcd 0000:00:1a.1: UHCI Host Controller
    [ 0.501587] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 2
    [ 0.501593] uhci_hcd 0000:00:1a.1: detected 2 ports
    [ 0.501626] uhci_hcd 0000:00:1a.1: irq 21, io base 0x000080c0
    [ 0.503178] SCSI subsystem initialized
    [ 0.503409] hub 2-0:1.0: USB hub found
    [ 0.503419] hub 2-0:1.0: 2 ports detected
    [ 0.503907] ehci-pci 0000:00:1a.7: EHCI Host Controller
    [ 0.503914] ehci-pci 0000:00:1a.7: new USB bus registered, assigned bus number 3
    [ 0.503929] ehci-pci 0000:00:1a.7: debug port 1
    [ 0.507842] ehci-pci 0000:00:1a.7: cache line size of 64 is not supported
    [ 0.507859] ehci-pci 0000:00:1a.7: irq 19, io mem 0xdd005c00
    [ 0.508093] libata version 3.00 loaded.
    [ 0.508752] serio: i8042 KBD port at 0x60,0x64 irq 1
    [ 0.508793] serio: i8042 AUX port at 0x60,0x64 irq 12
    [ 0.513351] ehci-pci 0000:00:1a.7: USB 2.0 started, EHCI 1.00
    [ 0.513563] hub 3-0:1.0: USB hub found
    [ 0.513629] hub 3-0:1.0: 4 ports detected
    [ 0.536813] hub 1-0:1.0: USB hub found
    [ 0.536828] hub 1-0:1.0: 2 ports detected
    [ 0.556530] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
    [ 0.560059] hub 2-0:1.0: USB hub found
    [ 0.560067] hub 2-0:1.0: 2 ports detected
    [ 0.560345] ehci-pci 0000:00:1d.7: EHCI Host Controller
    [ 0.560352] ehci-pci 0000:00:1d.7: new USB bus registered, assigned bus number 4
    [ 0.560366] ehci-pci 0000:00:1d.7: debug port 1
    [ 0.563401] firewire_ohci 0000:06:00.0: added OHCI v1.10 device as card 0, 4 IR + 0 IT contexts, quirks 0x10
    [ 0.568179] ehci-pci 0000:00:1d.7: cache line size of 64 is not supported
    [ 0.568198] ehci-pci 0000:00:1d.7: irq 20, io mem 0xdd005800
    [ 0.576683] ehci-pci 0000:00:1d.7: USB 2.0 started, EHCI 1.00
    [ 0.576856] hub 4-0:1.0: USB hub found
    [ 0.576865] hub 4-0:1.0: 8 ports detected
    [ 0.577213] uhci_hcd 0000:00:1d.0: UHCI Host Controller
    [ 0.577220] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 5
    [ 0.577228] uhci_hcd 0000:00:1d.0: detected 2 ports
    [ 0.577249] uhci_hcd 0000:00:1d.0: irq 20, io base 0x000080a0
    [ 0.577420] hub 5-0:1.0: USB hub found
    [ 0.577429] hub 5-0:1.0: 2 ports detected
    [ 0.577678] uhci_hcd 0000:00:1d.1: UHCI Host Controller
    [ 0.577684] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 6
    [ 0.577691] uhci_hcd 0000:00:1d.1: detected 2 ports
    [ 0.577712] uhci_hcd 0000:00:1d.1: irq 19, io base 0x00008080
    [ 0.577877] hub 6-0:1.0: USB hub found
    [ 0.577885] hub 6-0:1.0: 2 ports detected
    [ 0.578124] uhci_hcd 0000:00:1d.2: UHCI Host Controller
    [ 0.578130] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
    [ 0.578136] uhci_hcd 0000:00:1d.2: detected 2 ports
    [ 0.578156] uhci_hcd 0000:00:1d.2: irq 16, io base 0x00008060
    [ 0.578323] hub 7-0:1.0: USB hub found
    [ 0.578331] hub 7-0:1.0: 2 ports detected
    [ 0.578566] uhci_hcd 0000:00:1d.3: UHCI Host Controller
    [ 0.578573] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 8
    [ 0.578579] uhci_hcd 0000:00:1d.3: detected 2 ports
    [ 0.578609] uhci_hcd 0000:00:1d.3: irq 18, io base 0x00008040
    [ 0.578778] hub 8-0:1.0: USB hub found
    [ 0.578786] hub 8-0:1.0: 2 ports detected
    [ 0.579138] ahci 0000:00:1f.2: version 3.0
    [ 0.579314] ahci 0000:00:1f.2: irq 46 for MSI/MSI-X
    [ 0.579386] ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 4 ports 3 Gbps 0x33 impl SATA mode
    [ 0.579390] ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc ems sxs
    [ 0.597458] scsi0 : ahci
    [ 0.597577] scsi1 : ahci
    [ 0.597688] scsi2 : ahci
    [ 0.597787] scsi3 : ahci
    [ 0.597890] scsi4 : ahci
    [ 0.597988] scsi5 : ahci
    [ 0.598049] ata1: SATA max UDMA/133 abar m2048@0xdd005000 port 0xdd005100 irq 46
    [ 0.598053] ata2: SATA max UDMA/133 abar m2048@0xdd005000 port 0xdd005180 irq 46
    [ 0.598054] ata3: DUMMY
    [ 0.598056] ata4: DUMMY
    [ 0.598058] ata5: SATA max UDMA/133 abar m2048@0xdd005000 port 0xdd005300 irq 46
    [ 0.598060] ata6: SATA max UDMA/133 abar m2048@0xdd005000 port 0xdd005380 irq 46
    [ 0.916700] ata6: SATA link down (SStatus 0 SControl 300)
    [ 0.916718] ata5: SATA link down (SStatus 0 SControl 300)
    [ 1.063421] firewire_core 0000:06:00.0: created device fw0: GUID 0000000000000000, S400
    [ 1.083353] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [ 1.083369] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    [ 1.083987] ata1.00: ATA-8: TOSHIBA MK5055GSX, FG002C, max UDMA/100
    [ 1.083990] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
    [ 1.084680] ata1.00: configured for UDMA/100
    [ 1.084792] scsi 0:0:0:0: Direct-Access ATA TOSHIBA MK5055GS FG00 PQ: 0 ANSI: 5
    [ 1.087088] ata2.00: ATAPI: HL-DT-ST DVDRAM GSA-T50L, SC04, max UDMA/100
    [ 1.092125] ata2.00: configured for UDMA/100
    [ 1.113361] usb 2-2: new low-speed USB device number 2 using uhci_hcd
    [ 1.203938] scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-T50L SC04 PQ: 0 ANSI: 5
    [ 1.208648] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
    [ 1.208739] sd 0:0:0:0: [sda] Write Protect is off
    [ 1.208743] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [ 1.208779] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 1.290173] hidraw: raw HID events driver (C) Jiri Kosina
    [ 1.323084] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
    [ 1.323088] cdrom: Uniform CD-ROM driver Revision: 3.20
    [ 1.323226] sr 1:0:0:0: Attached scsi CD-ROM sr0
    [ 1.325332] usbcore: registered new interface driver usbhid
    [ 1.325335] usbhid: USB HID core driver
    [ 1.325918] input: Microsoft Wired Keyboard 600 as /devices/pci0000:00/0000:00:1a.1/usb2/2-2/2-2:1.0/0003:045E:0750.0001/input/input2
    [ 1.326088] hid-generic 0003:045E:0750.0001: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Wired Keyboard 600] on usb-0000:00:1a.1-2/input0
    [ 1.336169] input: Microsoft Wired Keyboard 600 as /devices/pci0000:00/0000:00:1a.1/usb2/2-2/2-2:1.1/0003:045E:0750.0002/input/input3
    [ 1.336217] hid-generic 0003:045E:0750.0002: input,hidraw1: USB HID v1.11 Device [Microsoft Wired Keyboard 600] on usb-0000:00:1a.1-2/input1
    [ 1.418377] sda: sda1 sda2
    [ 1.418731] sd 0:0:0:0: [sda] Attached SCSI disk
    [ 1.426688] tsc: Refined TSC clocksource calibration: 2394.269 MHz
    [ 1.446699] usb 4-4: new high-speed USB device number 3 using ehci-pci
    [ 2.115101] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
    [ 2.200031] usb 5-1: new low-speed USB device number 2 using uhci_hcd
    [ 2.385422] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/0003:046D:C05A.0003/input/input4
    [ 2.385472] hid-generic 0003:046D:C05A.0003: input,hidraw2: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.0-1/input0
    [ 2.426729] Switched to clocksource tsc
    [ 2.490018] usb 7-2: new full-speed USB device number 2 using uhci_hcd
    [ 2.502963] random: nonblocking pool is initialized
    [ 2.721320] systemd[1]: systemd 212 running in system mode. (+PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP -APPARMOR)
    [ 2.721454] systemd[1]: Detected architecture 'x86-64'.
    [ 2.739429] systemd[1]: Set hostname to <arch>.
    [ 3.632105] systemd[1]: Configuration file /etc/systemd/system/netctl@my\x2dnetwork.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
    [ 3.755410] systemd[1]: Starting Login Prompts.
    [ 3.755928] systemd[1]: Reached target Login Prompts.
    [ 3.755939] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
    [ 3.755992] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [ 3.756002] systemd[1]: Starting Remote File Systems.
    [ 3.756478] systemd[1]: Reached target Remote File Systems.
    [ 3.756488] systemd[1]: Expecting device sys-subsystem-net-devices-wlan0.device...
    [ 3.756839] systemd[1]: Starting Encrypted Volumes.
    [ 3.757313] systemd[1]: Reached target Encrypted Volumes.
    [ 3.757330] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
    [ 3.757364] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [ 3.757373] systemd[1]: Starting Paths.
    [ 3.757845] systemd[1]: Reached target Paths.
    [ 3.757866] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
    [ 3.758419] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
    [ 3.758432] systemd[1]: Starting Swap.
    [ 3.758902] systemd[1]: Reached target Swap.
    [ 3.758913] systemd[1]: Expecting device dev-disk-by\x2duuid-3e31eb5f\x2d326a\x2d4cd0\x2daab3\x2d7d1e7ac0797b.device...
    [ 3.759249] systemd[1]: Starting Root Slice.
    [ 3.766515] systemd[1]: Created slice Root Slice.
    [ 3.766527] systemd[1]: Starting User and Session Slice.
    [ 3.767173] systemd[1]: Created slice User and Session Slice.
    [ 3.767184] systemd[1]: Starting Device-mapper event daemon FIFOs.
    [ 3.767681] systemd[1]: Listening on Device-mapper event daemon FIFOs.
    [ 3.767691] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
    [ 3.768180] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [ 3.768189] systemd[1]: Starting Delayed Shutdown Socket.
    [ 3.768677] systemd[1]: Listening on Delayed Shutdown Socket.
    [ 3.768687] systemd[1]: Starting LVM2 metadata daemon socket.
    [ 3.769176] systemd[1]: Listening on LVM2 metadata daemon socket.
    [ 3.769189] systemd[1]: Starting udev Control Socket.
    [ 3.769676] systemd[1]: Listening on udev Control Socket.
    [ 3.769688] systemd[1]: Starting udev Kernel Socket.
    [ 3.770181] systemd[1]: Listening on udev Kernel Socket.
    [ 3.770192] systemd[1]: Starting Journal Socket.
    [ 3.770700] systemd[1]: Listening on Journal Socket.
    [ 3.770716] systemd[1]: Starting System Slice.
    [ 3.771341] systemd[1]: Created slice System Slice.
    [ 3.771357] systemd[1]: Started File System Check on Root Device.
    [ 3.771365] systemd[1]: Starting system-systemd\x2dfsck.slice.
    [ 3.772001] systemd[1]: Created slice system-systemd\x2dfsck.slice.
    [ 3.772011] systemd[1]: Mounting Temporary Directory...
    [ 3.790231] systemd[1]: Starting system-netctl.slice.
    [ 3.790914] systemd[1]: Created slice system-netctl.slice.
    [ 3.790930] systemd[1]: Starting system-getty.slice.
    [ 3.791567] systemd[1]: Created slice system-getty.slice.
    [ 3.809849] systemd[1]: Started Set Up Additional Binary Formats.
    [ 3.852492] systemd[1]: Starting Create list of required static device nodes for the current kernel...
    [ 3.876658] systemd[1]: Starting Apply Kernel Variables...
    [ 3.877416] systemd[1]: Mounting POSIX Message Queue File System...
    [ 3.878150] systemd[1]: Mounting Huge Pages File System...
    [ 3.878884] systemd[1]: Starting udev Coldplug all Devices...
    [ 3.879636] systemd[1]: Starting Setup Virtual Console...
    [ 3.880782] systemd[1]: Started Load Kernel Modules.
    [ 3.880820] systemd[1]: Mounting Configuration File System...
    [ 3.881579] systemd[1]: Mounting Debug File System...
    [ 3.882319] systemd[1]: Mounted FUSE Control File System.
    [ 3.882346] systemd[1]: Starting Journal Service...
    [ 3.883635] systemd[1]: Started Journal Service.
    [ 4.312288] EXT4-fs (sda1): re-mounted. Opts: data=ordered
    [ 4.431925] systemd-udevd[146]: starting version 212
    [ 5.513427] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input5
    [ 5.513433] ACPI: Power Button [PWRB]
    [ 5.513493] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input6
    [ 5.513777] ACPI: Lid Switch [LID0]
    [ 5.513831] input: Sleep Button as /devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input7
    [ 5.513834] ACPI: Sleep Button [SLPB]
    [ 5.513911] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input8
    [ 5.513914] ACPI: Power Button [PWRF]
    [ 5.596907] ACPI: AC Adapter [ACAD] (on-line)
    [ 5.645033] snd_hda_intel 0000:00:1b.0: irq 47 for MSI/MSI-X
    [ 5.657955] ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
    [ 5.661096] acpi device:08: registered as cooling_device0
    [ 5.663657] acpi device:0a: registered as cooling_device1
    [ 5.663725] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:06/LNXVIDEO:01/input/input9
    [ 5.708497] hp_accel: laptop model unknown, using default axes configuration
    [ 5.720053] lis3lv02d: 8 bits sensor found
    [ 5.729279] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
    [ 5.791571] ene_ir: chip is 0x3926 - kbver = 0x00, rev = 0xc0
    [ 5.791574] ene_ir: PLL freq = 1406
    [ 5.791575] ene_ir: KB3926C detected
    [ 5.791586] ene_ir: Firmware regs: 00 00
    [ 5.791587] ene_ir: Hardware features:
    [ 5.791589] ene_ir: * Uses GPIO 40 for IR demodulated input
    [ 5.821208] Monitor-Mwait will be used to enter C-1 state
    [ 5.821217] Monitor-Mwait will be used to enter C-2 state
    [ 5.821221] Monitor-Mwait will be used to enter C-3 state
    [ 5.821225] tsc: Marking TSC unstable due to TSC halts in idle
    [ 5.821242] ACPI: acpi_idle registered with cpuidle
    [ 5.821270] Switched to clocksource hpet
    [ 5.827916] Registered IR keymap rc-rc6-mce
    [ 5.828003] input: ENE eHome Infrared Remote Receiver as /devices/virtual/rc/rc0/input10
    [ 5.828066] rc0: ENE eHome Infrared Remote Receiver as /devices/virtual/rc/rc0
    [ 5.840895] ene_ir: driver has been successfully loaded
    [ 5.848018] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input11
    [ 5.877265] IR JVC protocol handler initialized
    [ 5.878491] IR NEC protocol handler initialized
    [ 5.879175] IR RC6 protocol handler initialized
    [ 5.880281] IR RC5(x) protocol handler initialized
    [ 5.880739] IR SANYO protocol handler initialized
    [ 5.881059] input: MCE IR Keyboard/Mouse (ene_ir) as /devices/virtual/input/input12
    [ 5.881065] IR MCE Keyboard/mouse protocol handler initialized
    [ 5.881065] IR Sony protocol handler initialized
    [ 5.881758] lirc_dev: IR Remote Control driver registered, major 249
    [ 5.882267] rc rc0: lirc_dev: driver ir-lirc-codec (ene_ir) registered at minor = 0
    [ 5.882270] IR LIRC bridge handler initialized
    [ 5.891466] [Firmware Bug]: Invalid critical threshold (0)
    [ 5.892123] thermal LNXTHERM:00: registered as thermal_zone0
    [ 5.892126] ACPI: Thermal Zone [TZ01] (31 C)
    [ 5.903447] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input13
    [ 5.903835] wmi: Mapper loaded
    [ 5.927466] ACPI: Battery Slot [BAT0] (battery present)
    [ 6.029419] [drm] Initialized drm 1.1.0 20060810
    [ 6.114983] cfg80211: Calling CRDA to update world regulatory domain
    [ 6.137776] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042f conflicts with OpRegion 0x0000000000000400-0x000000000000047f (\PMBA) (20131218/utaddress-258)
    [ 6.137785] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 6.137789] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052f conflicts with OpRegion 0x0000000000000500-0x000000000000050f (\GPIO) (20131218/utaddress-258)
    [ 6.137793] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 6.137822] lpc_ich: Resource conflict(s) found affecting gpio_ich
    [ 6.180252] Intel(R) Wireless WiFi driver for Linux, in-tree:
    [ 6.180255] Copyright(c) 2003- 2014 Intel Corporation
    [ 6.180475] iwlwifi 0000:02:00.0: irq 48 for MSI/MSI-X
    [ 6.287693] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
    [ 6.287960] r8169 0000:03:00.0: irq 49 for MSI/MSI-X
    [ 6.288149] r8169 0000:03:00.0 eth0: RTL8168c/8111c at 0xffffc9000584a000, 00:00:00:00:00:00, XID 1c4000c0 IRQ 49
    [ 6.288152] r8169 0000:03:00.0 eth0: jumbo features [frames: 6128 bytes, tx checksumming: ko]
    [ 6.345229] mousedev: PS/2 mouse device common for all mice
    [ 6.436120] ACPI Warning: SystemIO range 0x0000000000008000-0x000000000000801f conflicts with OpRegion 0x0000000000008000-0x000000000000800f (\_SB_.PCI0.SBUS.SMBI) (20131218/utaddress-258)
    [ 6.436128] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 6.526671] microcode: CPU0 sig=0x10676, pf=0x80, revision=0x60c
    [ 6.535077] media: Linux media interface: v0.10
    [ 6.569608] microcode: CPU1 sig=0x10676, pf=0x80, revision=0x60c
    [ 6.569745] microcode: Microcode Update Driver: v2.00 <[email protected]>, Peter Oruba
    [ 6.570548] input: HDA Intel HDMI/DP,pcm=3 Phantom as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
    [ 6.570639] input: HDA Intel Front Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
    [ 6.570714] input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
    [ 6.581760] input: PC Speaker as /devices/platform/pcspkr/input/input18
    [ 6.599116] iwlwifi 0000:02:00.0: loaded firmware version 8.83.5.1 build 33692 op_mode iwldvm
    [ 6.683172] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
    [ 6.683177] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
    [ 6.683179] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
    [ 6.683182] iwlwifi 0000:02:00.0: Detected Intel(R) WiFi Link 5100 AGN, REV=0x54
    [ 6.683232] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [ 6.701985] Linux video capture interface: v2.00
    [ 6.780556] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
    [ 6.922833] nvidia: module license 'NVIDIA' taints kernel.
    [ 6.922839] Disabling lock debugging due to kernel taint
    [ 6.939605] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
    [ 6.939882] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 0
    [ 6.939892] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 337.12 Fri Apr 4 14:51:15 PDT 2014
    [ 6.991292] iTCO_vendor_support: vendor-support=0
    [ 6.991687] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10
    [ 6.991726] iTCO_wdt: Found a ICH9M TCO device (Version=2, TCOBASE=0x0460)
    [ 6.991831] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
    [ 7.064547] input: HP WMI hotkeys as /devices/virtual/input/input19
    [ 7.066862] systemd-udevd[153]: renamed network interface eth0 to enp3s0
    [ 7.089277] Bluetooth: Core ver 2.18
    [ 7.089304] NET: Registered protocol family 31
    [ 7.089306] Bluetooth: HCI device and connection manager initialized
    [ 7.089316] Bluetooth: HCI socket layer initialized
    [ 7.089319] Bluetooth: L2CAP socket layer initialized
    [ 7.089331] Bluetooth: SCO socket layer initialized
    [ 7.097641] gpio_ich: GPIO from 195 to 255 on gpio_ich
    [ 7.119889] uvcvideo: Found UVC 1.00 device HP Webcam (05c8:010f)
    [ 7.125560] usbcore: registered new interface driver btusb
    [ 7.136432] input: HP Webcam as /devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0/input/input20
    [ 7.136523] usbcore: registered new interface driver uvcvideo
    [ 7.136525] USB Video Class driver (1.1.1)
    [ 7.162108] kvm: disabled by bios
    [ 7.167498] systemd-udevd[149]: renamed network interface wlan0 to wlp2s0
    [ 7.515656] psmouse serio1: synaptics: Touchpad model: 1, fw: 6.5, id: 0x1c0b1, caps: 0xa04751/0xa00000/0x0, board id: 3655, fw id: 428212
    [ 7.594362] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input14
    [ 7.949749] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: data=ordered
    [ 8.055002] systemd-journald[127]: Received request to flush runtime journal from PID 1
    [ 13.835532] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [ 13.838466] iwlwifi 0000:02:00.0: Radio type=0x1-0x2-0x0
    [ 13.935096] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [ 13.938046] iwlwifi 0000:02:00.0: Radio type=0x1-0x2-0x0
    [ 13.964225] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
    [ 14.845976] nvidia 0000:01:00.0: irq 50 for MSI/MSI-X
    [ 20.903153] wlp2s0: authenticate with b8:c7:5d:02:3b:9d
    [ 20.906517] wlp2s0: send auth to b8:c7:5d:02:3b:9d (try 1/3)
    [ 20.909113] wlp2s0: authenticated
    [ 20.910074] wlp2s0: associate with b8:c7:5d:02:3b:9d (try 1/3)
    [ 20.913437] wlp2s0: RX AssocResp from b8:c7:5d:02:3b:9d (capab=0x1431 status=0 aid=7)
    [ 20.918955] wlp2s0: associated
    [ 20.919008] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
    [ 21.089546] wlp2s0: deauthenticating from b8:c7:5d:02:3b:9d by local choice (reason=2)
    [ 21.096263] wlp2s0: authenticate with b8:c7:5d:02:3b:9d
    [ 21.099042] wlp2s0: send auth to b8:c7:5d:02:3b:9d (try 1/3)
    [ 21.099780] cfg80211: Calling CRDA for country: AT
    [ 21.101974] wlp2s0: authenticated
    [ 21.103555] wlp2s0: associate with b8:c7:5d:02:3b:9d (try 1/3)
    [ 21.108457] wlp2s0: RX AssocResp from b8:c7:5d:02:3b:9d (capab=0x1431 status=0 aid=7)
    [ 21.115231] wlp2s0: associated
    [ 26.591580] fuse init (API version 7.22)
    [ 148.105211] wlp2s0: authenticate with b8:c7:5d:02:3b:9e
    [ 148.107797] wlp2s0: direct probe to b8:c7:5d:02:3b:9e (try 1/3)
    [ 148.108518] cfg80211: Calling CRDA to update world regulatory domain
    [ 148.310034] wlp2s0: direct probe to b8:c7:5d:02:3b:9e (try 2/3)
    [ 148.513366] wlp2s0: send auth to b8:c7:5d:02:3b:9e (try 3/3)
    [ 148.514272] wlp2s0: authenticated
    [ 148.516865] wlp2s0: associate with b8:c7:5d:02:3b:9e (try 1/3)
    [ 148.517652] wlp2s0: RX AssocResp from b8:c7:5d:02:3b:9e (capab=0x1511 status=0 aid=4)
    [ 148.519034] wlp2s0: associated
    [ 148.531940] wlp2s0: Limiting TX power to 30 (30 - 0) dBm as advertised by b8:c7:5d:02:3b:9e
    [ 231.077026] wlp2s0: authenticate with b8:c7:5d:02:3b:9d
    [ 231.080206] wlp2s0: send auth to b8:c7:5d:02:3b:9d (try 1/3)
    [ 231.081422] cfg80211: Calling CRDA to update world regulatory domain
    [ 231.082756] wlp2s0: authenticated
    [ 231.083955] wlp2s0: waiting for beacon from b8:c7:5d:02:3b:9d
    [ 231.362261] wlp2s0: authenticate with b8:c7:5d:02:3b:9e
    [ 231.365917] wlp2s0: send auth to b8:c7:5d:02:3b:9e (try 1/3)
    [ 231.380479] wlp2s0: authenticated
    [ 231.383400] wlp2s0: associate with b8:c7:5d:02:3b:9e (try 1/3)
    [ 231.386425] wlp2s0: RX AssocResp from b8:c7:5d:02:3b:9e (capab=0x1511 status=0 aid=4)
    [ 231.390072] wlp2s0: associated
    [ 231.481241] wlp2s0: Limiting TX power to 30 (30 - 0) dBm as advertised by b8:c7:5d:02:3b:9e
    [ 311.833862] perf samples too long (2511 > 2500), lowering kernel.perf_event_max_sample_rate to 50100
    [ 3074.285425] Watchdog[977]: segfault at 0 ip 00007f42693ed9b8 sp 00007f4251f777d0 error 6 in chromium[7f4265a4e000+55d7000]
    [ 3166.859073] chromium[1212]: segfault at 39 ip 00007f7ddd6a7280 sp 00007fff9d984088 error 6 in chromium[7f7ddcefc000+55d7000]
    [ 3172.385333] chromium[1169]: segfault at fbadbeef ip 00007f7ddf63345d sp 00007fff9d983f20 error 6 in chromium[7f7ddcefc000+55d7000]

  • What's wrong with my Arch linux grub bootup/FSTAB? [Solved]

    So ever since I did a fresh install of Arch Linux, every time it boots up and I select the Grub option it says "A start job is running for /dev/drive/" and shortly after it says timed out and continues onto the login screen as normal.
    I have two drives, Windows is on the other one and on the Linux one I have just two partitions, root and swap.
    I've tried to do a couple of things such as creating another grub option and setting the root to that ID however it still seems to be occurring. It seems to me that it keeps changing because sometimes when I boot it doesn't do it but it is very rare that it doesn't do the start job.
    How can I permanently make the GRUB2 menu boot the correct drive and partitions, both root{ext4} and swap without it having to run a start job every time I boot it up?
    Last edited by Developer (2015-04-09 19:02:42)

    WorMzy wrote:
    Note that sda,sdb,sdc... names are assigned on a first-come, first-served, per boot basis, so they are not ideal for use in your fstab. Instead, you should use UUIDs or labels.
    https://wiki.archlinux.org/index.php/Pe … ice_naming
    The problem is back, the drive names keep changing, how can I use UUID's for the fstab?
    I saw something about UUID's above each drive name however, they were commented out. Do I replace the drive name part with the UUID for every drive, so for example:
    /dev/sdb1 / ext4   rw,relatime,discard,data=ordered
    to
    UUID=b411dc99-f0a0-4c87-9e05-184977be8539 /home ext4   rw,relatime,discard,data=ordered
    Or do I just uncomment the UUID part? which would leave me with something along the lines of:
    UUID=b411dc99-f0a0-4c87-9e05-184977be8539
    /dev/sdb1 / ext4   rw,relatime,discard,data=ordered

  • Shadowgrounds Survivor segfaults in Arch Linux

    Hi,
    I can't get the game "Shadowgrounds Survivor" to run in Arch Linux. The Launcher (launcher-bin) works, but when starting the game (survivor-bin) it immediately segfaults.
    System info: Linux scrawl-desktop 2.6.32-ARCH #1 SMP PREEMPT Tue Feb 23 19:43:46 CET 2010 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
    Packages: All up to date
    Architecture: 64 bit
    Graphics Card: NVIDIA GeForce 7600 GS
    Graphics Driver: NVIDIA Version 190.53
    All the necessary 32 bit libraries and 32 bit graphics driver are installed.
    I even installed a 32 bit-chroot and ran the game from it but it segfaults in the chroot, too.
    And, now what is strange: on a Ubuntu 9.04 LiveCD 32-bit, it works.
    Has anyone got this to work in Arch Linux?
    GDB Backtrace (not useful to me)
    #0 0xf76d7940 in ?? () from /home/.games/shadowgrounds2/lib/libstdc++.so.6
    #1 0xf7662b68 in bool std::has_facet<std::ctype<char> >(std::locale const&) ()
    from /home/.games/shadowgrounds2/lib/libstdc++.so.6
    #2 0xf76571d8 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) () from /home/.games/shadowgrounds2/lib/libstdc++.so.6
    #3 0xf7657287 in std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) ()
    from /home/.games/shadowgrounds2/lib/libstdc++.so.6
    #4 0xf764241a in std::ios_base::Init::Init() ()
    from /home/.games/shadowgrounds2/lib/libstdc++.so.6
    #5 0xf7d58b15 in ?? ()
    from /home/.games/shadowgrounds2/lib/libboost_thread-mt.so.1.37.0
    #6 0xf7d5de1d in ?? ()
    from /home/.games/shadowgrounds2/lib/libboost_thread-mt.so.1.37.0
    #7 0xf7d585bc in _init ()
    from /home/.games/shadowgrounds2/lib/libboost_thread-mt.so.1.37.0
    #8 0xf7fee69c in call_init () from /lib/ld-linux.so.2
    #9 0xf7fee7b1 in _dl_init_internal () from /lib/ld-linux.so.2
    #10 0xf7fe084f in _dl_start_user () from /lib/ld-linux.so.2
    Last edited by scrawl (2010-10-09 15:54:35)

    Sorry all for posting in the wrong forum, that means you Skottish :-). Had a few problems with installing and running under x86_64 Arch, got those sorted out in the AUR, most of the bugs seem to be coming from the inclusion of an older model installer, next beta should help fix that. I haven't played too far into it yet, taking things slow and keeping notes, but remarkably few bugs have popped up. The game play is ...........different than I used to, it's almost like an arcade game, I died once and noticed that I had "5 Respawns Remaining". As I said, it's a top down shooter, most resolutions are supported, and I don't even know if this is supported, but it has options for PhysFX! As for the game itself, think of Aliens vs. Colonial Marines in flavor. More later.
    Last edited by Slammer64 (2009-02-23 01:29:03)

Maybe you are looking for