Setting up encryption on an already installed Arch setup?

Recently I have been thinking about setting up encryption on my already installed Arch setup. I would reinstall and encrypt it that way, however I do not have an external HDD big enough to back up everything, so I was wondering if it is possible to encrypt a hard disk on an already installed Arch setup. I have two partitions, /dev/sda1 and /dev/sda2, and would like to encrypt both while not having to reinstall.
Can anyone help? Thanks!
Edit:
Alternatively, could I reinstall it and use encryption in the install in such a way that it retains my file contents?
Last edited by ThatPerson (2013-07-30 12:41:13)

I use rsync rather than tar to do what Stebalien is suggesting here.  I use btrfs, and my root filesystem is actually a subvolume.  So I mount the entire btrfs filesystem (from subvolid=0) at /var/lib/btrfs-root.  By doing this, it makes it much easier to simply rsync (or tar) from that mountpoint to the backup mountpoint.  This makes it so that I can actually backup the system I am running off of without explicitly excluding all the volatile directories (like /sys, /tmp, /proc, etc.)  Though I think a more sane approach, since I use btrfs, would be to snapshot each subvol and rsync those instead. 
I guess what I am trying to get at, is that if you were to create something like /mnt/system and /mnt/backup.  If you mounted your rootfs to /mnt/system (and then possibly your home partition to /mnt/system/home), then mount the backup destination to /mnt/backup, you could simply do something like:
# rsync -aAXv /mnt/system/* /mnt/backup
Then of course you would have to put it all back after you set up Luks/dmcrypt.
This installation I use has been through a few different drives and trying and removing Luks/dmcrypt.  I have also changed filesystems, switched to LVM2, tried mdadm RAID0, mdadm RAID1, and eventually went back to btrfs.  So as mentioned above, there is really no need to reinstall just to change the underlying layout of the HDD/SSD.  Of course this assumes that you have a spare drive with the space to copy your entire filesystem to... but then you should have backups anyway, right?

Similar Messages

  • Installing Arch encrypted using LVM on top of LUKS

    I just installed Arch following this this wiki page and this guide .
    While booting, it gets to the point when it asks for the password. Once I provide the password, the whole process halts. No messages, nothing.
    # fdisk -l /dev/sda
    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x66c02a9c
    Device Boot Start End Blocks Id System
    /dev/sda1 1953327285 1953520064 96390 83 Linux
    /dev/sda2 1952540100 1953327284 393592+ 83 Linux
    /dev/sda3 63 1952540099 976270018+ 83 Linux
    Partition table entries are not in disk order
    /dev/sda2 contains information unrelated to my arch installation and is not to be mounted by the system
    /dev/sda3 is the encrypted partition used as a physical volume and contains my volume group and all my logical volumes.
    # pvscan
    PV /dev/mapper/abierto VG grupito lvm2 [931.04 GiB / 867.04 GiB free]
    Total: 1 [931.04 GiB] / in use: 1 [931.04 GiB] / in no VG: 0 [0 ]
    # lvscan
    ACTIVE '/dev/grupito/swap' [4.00 GiB] contiguous
    ACTIVE '/dev/grupito/casa' [40.00 GiB] inherit
    ACTIVE '/dev/grupito/raiz' [20.00 GiB] inherit
    mkinitcpio.conf
    mkinitcpio.conf wrote:
    # vim:set ft=sh
    # MODULES
    # The following modules are loaded before any boot hooks are
    # run.  Advanced users may wish to specify all system modules
    # in this array.  For instance:
    #     MODULES="piix ide_disk reiserfs"
    MODULES="dm-snapshot ext4"
    # BINARIES
    # This setting includes, into the CPIO image, and additional
    # binaries a given user may wish.  This is run first, so may
    # be used to override the actual binaries used in a given hook.
    # (Existing files are NOT overwritten is already added)
    # BINARIES are dependancy parsed, so you may safely ignore libraries
    BINARIES=""
    # FILES
    # This setting is similar to BINARIES above, however, files are added
    # as-is and are not parsed in anyway.  This is useful for config files.
    # Some users may wish to include modprobe.conf for custom module options,
    # like so:
    #    FILES="/etc/modprobe.conf"
    FILES=""
    # HOOKS
    # This is the most important setting in this file.  The HOOKS control the
    # modules and scripts added to the image, and what happens at boot time.
    # Order is important, and it is recommended that you do not change the
    # order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
    # help on a given hook.
    # 'base' is _required_ unless you know precisely what you are doing.
    # 'udev' is _required_ in order to automatically load modules
    # 'filesystems' is _required_ unless you specify your fs modules in MODULES
    # Examples:
    #    This setup specifies all modules in the MODULES setting above.
    #    No raid, lvm2, or encrypted root is needed.
    #    HOOKS="base"
    #    This setup will autodetect all modules for your system and should
    #    work as a sane default
    #    HOOKS="base udev autodetect pata scsi sata filesystems"
    #    This is identical to the above, except the old ide subsystem is
    #    used for IDE devices instead of the new pata subsystem.
    #    HOOKS="base udev autodetect ide scsi sata filesystems"
    #    This setup will generate a 'full' image which supports most systems.
    #    No autodetection is done.
    #    HOOKS="base udev pata scsi sata usb filesystems"
    #    This setup assembles an pata raid array with an encrypted root FS.
    #    Note: See 'mkinitcpio -H raid' for more information on raid devices.
    #    HOOKS="base udev pata raid encrypt filesystems"
    #    This setup loads an lvm2 volume group on a usb device.
    #    HOOKS="base udev usb lvm2 filesystems"
    HOOKS="base udev autodetect pata scsi sata usb encrypt lvm2 filesystems"
    # COMPRESSION
    # Use this to compress the initramfs image. With kernels earlier than
    # 2.6.30, only gzip is supported, which is also the default. Newer kernels
    # support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
    # compression.
    #COMPRESSION="gzip"
    #COMPRESSION="bzip2"
    #COMPRESSION="lzma"
    #COMPRESSION="xz"
    # COMPRESSION_OPTIONS
    # Additional options for the compressor
    #COMPRESSION_OPTIONS=""
    menu.lst
    menu.lst wrote:
    # Config file for GRUB - The GNU GRand Unified Bootloader
    # /boot/grub/menu.lst
    # DEVICE NAME CONVERSIONS
    #  Linux           Grub
    #  /dev/fd0        (fd0)
    #  /dev/sda        (hd0)
    #  /dev/sdb2       (hd1,1)
    #  /dev/sda3       (hd0,2)
    #  FRAMEBUFFER RESOLUTION SETTINGS
    #     +-------------------------------------------------+
    #          | 640x480    800x600    1024x768   1280x1024
    #      ----+--------------------------------------------
    #      256 | 0x301=769  0x303=771  0x305=773   0x307=775
    #      32K | 0x310=784  0x313=787  0x316=790   0x319=793
    #      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
    #      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
    #     +-------------------------------------------------+
    #  for more details and different resolutions see
    #  http://wiki.archlinux.org/index.php/GRU … Resolution
    # general configuration:
    timeout   5
    default   0
    color light-blue/black light-cyan/blue
    # boot sections follow
    # each is implicitly numbered from 0 in the order of appearance below
    # TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
    # (0) Arch Linux
    title  Arch Linux
    root   (hd0,0)
    kernel /vmlinuz26 root=/dev/mapper/grupito-raiz cryptdevice=/dev/sda3:grupito ro
    initrd /kernel26.img
    # (1) Arch Linux
    title  Arch Linux Fallback
    root   (hd0,0)
    kernel /vmlinuz26 root=/dev/mapper/grupito-raiz cryptdevice=/dev/sda3:grupito ro
    initrd /kernel26-fallback.img
    I would appreciate some hint here (where to look and what to try?).
    Thanks.

    Okay, so I don't understand though how containing fragmentation to a certain partition will lead to a benefit.  What you are really trying to avoid are seek times, right? So if /var/log is on the same disk as everything else, you are still going to have those seeks occuring and therefore slowing everything else on that disk down, no? I think that this technique is beneficial if you actually have the fragmented filesystem on a separate disk.  But the same disk will have the same problems.
    I don't understand the question at the end... "wouldn't be the same, now with /"?  What does that mean?
    Also, if you want to defragment something, you can simply "cp -a" it from one place to another, or yu can use something like rsync.  Linux is really neat in that it has everything as a file.  So you can literally just copy all the relevant files from one place to another and have a working bootable system.  No magic boot code or anything like that that is hidden from the user.
    In reality though, it is not the /var/log that i think is acusing the problems.  I was simply explaining to you why your logs show those errors.  I think the real problem is having /usr on a separate partition.  Though this is somewhat "supported" in Arch Linux, and I have used this in the past, it is not something I feel as though I could count on.  So...
    Me wrote:Is there a reason why you need to have a separate /usr?  It would make your life far simpler if you just integrated it into your rootfs.

  • Trying to install Arch with Ubuntu hardy already installed

    I have Ubuntu already installed on my system and I want to install Arch on a separate 10gig partition ( which is already made) but when I boot from the Arch cd and go to install Arch only sees the main drive it doesn't see anything else what am I doing wrong. I only want to install arch on the 10 gig partition for now until I am more familiar with Linux
    Last edited by Shadowmeph (2008-05-20 17:35:28)

    I have just read that  it is informative but I am not sure of what that will do inorder for me to be able to install Arch on My tem gig partition, when I am in ubuntu I stat gparted to see what the names of my partitions are and this is what it shows /dev/sda3 swap     1gig /dev/ sda2 reiserfs 10 gigs ( where I want to install Arch)  sda1 / Ubuntu how do I install arch onto dev/sda 2 ) the ten gig partition) if arch doesn't see it? do I have to delete the partition or formaste the 10 gig partition differently? I am pretty new to Linux so I am not sure of how to do this.
    this is what my grub looks like
    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.
    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu
    # Pretty colours
    #color cyan/blue white/blue
    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret
    # examples
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below
    ## DO NOT UNCOMMENT THEM, Just edit them to your needs
    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro
    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)
    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true
    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false
    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash
    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false
    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=
    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0
    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single
    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all
    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true
    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false
    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false
    ## ## End Default Options ##
    title Ubuntu 8.04, kernel 2.6.24-16-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro quiet splash
    initrd /boot/initrd.img-2.6.24-16-generic
    quiet
    title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro single
    initrd /boot/initrd.img-2.6.24-16-generic
    title Ubuntu 8.04, memtest86+
    root (hd0,0)
    kernel /boot/memtest86+.bin
    quiet
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    ok edit two I think that I have Arch install but I am not sure of which way to use
    Dual booting with other linux distros
    This is done exactly the same way that Arch linux is loaded. Here we assume that the other distro is on partition [s/h]da3.
    title Other Linux
    root (hd0,2)
    kernel /boot/vmlinuz (add other options here as required)
    initrd /boot/initrd.img (if the other kernel uses/needs one)
    [edit] Dual booting with other linux distro (Chainloading)
    To avoid maintenance nightmare, you might want to chainload the GRUB in the MBR to another bootloader you might have installed in the bootrecord of a partition [(hd0,2) in our example] instead of the MBR. This way the auto-magic stuff of some distro will manage the menu.lst on (hd0,2) (if it is grub) for its own distro and you will boot with all the option needed (like the correct last kernel) without the need to copy/paste some part of that menu.lst into yours.
    In our example [1], GRUB is in the MBR and some other bootloader (BL) (be it grub or lilo) is in the Boot Record of (hd0,2).
    |   |           |           |    %   (hd0,2)     |
    | M |           |           | B  %               |
    | B |  (hd0,0)  |  (hd0,1)  | L  %  Other        |
    | R |           |           |    %  Distro       |
    |   |           |           |    %               |
      |                            ^
      |     chainloading           |
    Then, you simply use in your menu.lst:
    title Other Linux distro
    root (hd0,2)
    chainloader +1
    Last edited by Shadowmeph (2008-05-20 17:56:20)

  • Is it possible to install Arch with encrypt $HOME?

    Hello,
    I'm going to buy a new laptop and i'd like to install Archlinux into it.
    Ubuntu 9.10 gives you the choice to encrypt your home directory during installation.
    Is it possible to do the same with Arch?
    I read the WIKI about encryptions and it looks pretty "hard" to do it...?
    Thanks in advance for your answers!

    Dieter@be wrote:that information is outdated.  Since 2009.08 you can do encryption and lvm with the arch installer.
    I did not see that while installing - the encrypted $HOME with ecryptfs I mean.
    Did I overlook it?
    (I used the netinstall.iso)
    anyway - with the help of the two guides mentioned by anrxc (and another post on the subject here in the forums) I got it working.
    After setting up a group "ecryptfs", adding the user to it, then having the PAM-Rules ready and the ecryptfs module loaded it was then as simple as typing:
    ecryptfs-migrate-home -u $USER
    The PAM-Rules as they are now:
    /etc/pam.d/login
    #%PAM-1.0
    auth required pam_securetty.so
    auth requisite pam_nologin.so
    auth required pam_unix.so nullok
    auth optional pam_ecryptfs.so unwrap
    auth required pam_tally.so onerr=succeed file=/var/log/faillog
    # use this to lockout accounts for 10 minutes after 3 failed attempts
    #auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog
    account required pam_access.so
    account required pam_time.so
    account required pam_unix.so
    #password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
    password optional pam_ecryptfs.so
    #password required pam_unix.so md5 shadow use_authtok
    session required pam_unix.so
    session optional pam_ecryptfs.so unwrap
    session required pam_env.so
    session required pam_motd.so
    session required pam_limits.so
    session optional pam_mail.so dir=/var/spool/mail standard
    session optional pam_lastlog.so
    /etc/pam.d/gdm
    #%PAM-1.0
    auth requisite pam_nologin.so
    auth required pam_env.so
    auth required pam_unix.so
    auth optional pam_ecryptfs.so unwrap
    auth optional pam_gnome_keyring.so
    account required pam_unix.so
    session required pam_limits.so
    session required pam_unix.so
    session optional pam_ecryptfs.so unwrap
    session optional pam_gnome_keyring.so auto_start
    password required pam_unix.so
    password optional pam_ecryptfs.so
    Seems to work well so far - only compiling software from AUR has failed sometimes - maybe some mount-options not suitable for "fakeroot"?
    I just put the build-directory outside of the encrypted $HOME and symlinked to it - then it worked.
    ...my first 4 days with ARCH - coming from Gentoo, which I used solely for at least the last 4 years - and I like it and intend to stay with it
    I did try Mint (Ubuntu) - thats how I came to want to have my $HOME encrypted with ecryptfs.
    But I was not quite happy with it and now I'm here with ARCH.
    Cheers
    Last edited by jomen (2010-03-18 03:11:06)

  • Installing Arch on Asus Eee, Already Read the Wiki [Solved]

    I'm attempting to install Arch on my Asus Eee 701 (4GB SSD model) and I made a mistake that I'm having trouble correcting.  First, I accidentally wrote the image to my Eee's SSD, instead of my USB drive.  I tried to install Arch with the installer on my SSD, set up the partitions (one for /, one for /boot, and one for /home), but when I issued the command, it told me that the disk was in use.  It was then that I realized what I did.  I used an Ubuntu LiveCD on another computer to burn the image file again, this time to my USB drive.  I booted my Eee from the USB drive and tried to partition my SSD again, but this time, it tells me:
    Device or resource busy
    This disk is currently in use - repartitioning is probably a bad idea.
    Unmount all file systems, and swapoff all swap partitions on this disk.
    Use the --no-reread flag to suppress this check.
    Use the --force flag to overrule all checks.
    When I boot from my SSD, I get the same message, so I'm not even 100% certain that I booted from my USB drive before.  My USB drive's activity light was on though.
    Is there any way to fix this?  Also, given that I have an SSD, what partitions should I set up and how big should they be?  I can't find any concrete numbers in the wiki.
    Thanks in advance for the help.
    Last edited by Tyrian (2008-11-17 04:14:23)

    I'll try that, thanks.  What would happen if I dismounted the SSD with -f if it was in use?
    EDIT:  I just realized that when I go into the installer, it lets me set up partitions manually (I run the installer, pick "Prepare Hard Drive", "Partition Hard Drives", "/dev/sda").  But how should I set them up?  When I test it by just making one 4GB partition, it tells me, "Wrote partition table, but re-read table failed.  Reboot to update table."  So I rebooted, and it appears to work.  So I deleted that partition, made a 512MB one, rebooted, and repeated until I had 3 partitions in ext2, a 512MB (sda1, bootable), 512MB (sda2), and one roughly 2.5GB (sda3).  I then went to "Set Filesystem Mountpoints", said "NONE" for the swap (due to the avoiding pitfalls section of the wiki), picked "/dev/sda1" as "/" in ext2, made "/dev/sda2" as ext2 called "/var", and made "/dev/sda3" in ext2 called "/home", then said "DONE".  When I say "Yes" as the confirmation prompt, I get this message:
    Error creating filesystem: mke2fs /dev/sda1
    I hit enter and get dropped back to the "Prepare Hard Drive" menu.  I followed this section of the Beginner's Guide too.
    Is there any way to fix this?
    Last edited by Tyrian (2008-11-15 18:37:10)

  • Problems with installing Arch on encrypted drive

    Hello again!
    I am now trying to install Arch Linux on my AA1L machine, with encrypted root partition. I have /dev/sda1 which is the unencrypted boot and /dev/sda2 which is the encrypted / partition. I followed the ArchWiki article which explained me to have 'encrypt' in the HOOKS variable of /etc/mkinitcpio.conf. However when I boot, GRUB gives me "/dev/mapper/root not found". Any ideas what did I miss?

    you should not "just have" the hook in /etc/mkinitcpio.conf. It should be at the correct location (eg just before "filesystems")
    Don't forget to rebuild your initcpio with mkinitcpio if you change settings in /etc/mkinitcpio.conf.
    And also what Funbird said.
    Both of these things are nicely documented @ http://wiki.archlinux.org/index.php/LUKS_Encrypted_Root, btw

  • How do i set up my hp c4360 for wireless if the printer is already installed???

    hi
    How do I set up my hp c4360 photosmart for wireless, asi tis already installed on my Dell laptp xps,
    I put the installation disc in and it says printer already installed, I have a linksys wireless router
     I didnt have the patience to figure this out but its getting to be a pain to drag the laptop to the printer every time I need something printed. I am not real savvy with technical things, the Comcast guy setup my wireless router for me so i am hopin this won't be too complicated
    thanks

    Verify that you can browse to the printer's internal web page by its IP address.
    1. Click "Start" button --> Printers and Faxes.
    2. Under Printer Tasks, click "Add Printer".
    3. Click "Next" button on the Add Printer Wizard window.
    4. Select "Local printer attached to this computer". Deselect "Automatically detect and install My Plug and play printer". Click "Next".
    5. Under Select a Printer Port option, select "Create a new port" and select "Standard TCP/IP Port" and click "Next" button.
    6. In the "Welcome to the Add Standard TCP/IP printer port wizard" make sure that the printer is turned on and connected to same network that your computer is connected to. Click "Next" button.
    7. Under "Add Standard TCP/IP Printer Port" enter the printer's IP address. Click "Next" then click "Finish".
    8. Now, select HP from the list of manufacturers, select your printer from the list of Printer models and click 'Next' button.
    9. If you can't find your printer, you'll need to find the install CD and use the "Have Disk" option to select one of the hp*.ini files. Alternatively, you can select another HP printer model from the same type.
    10. Add the print spooler name and click "Next".
    11. Click "Next"
    12. Click "Next" and then "Finish"
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Install Arch into already partitioned HardDrive

    Right now I have a separate partition for /home directory.
    How can I install Arch so that it will not do any chances to /home partition and just format the / partition.

    hi, i'm in a similar situation
    i already have a /home/cngn partition/directory with my media files on it (from different linux installation)
    after installing arch should I use the -m option while adding a user cngn or not?
    Last edited by cngn (2010-03-20 10:23:46)

  • Already installed package - not by Arch?

    OK, this is and odd one. Many moons and several distros ago, I installed burg to a separate /boot partition, and have continued to use this /boot partition throughout. the original installation distro has long since been eradicated from my system, and I've maintained burg.cfg manually (for those that don't know, burg and grub are much the same, except burg has additional theming).
    Tonight, I decided to save myself some effort and install burg from AUR, reusing my existing config. I use packer for AUR, which has (rather un-helpfully this time) advised me that "package burg....etc is up to date - reinstalling". How does it know? Arch doesn't know anything about my bootloader at all.

    @ cfr
    Not possible. When I installed Arch I did so on to a bare partition, so no burg scripts or configuration files lying around to remove or run. (I formatted the partition thus eradicating the old distro). burg was fully contained within /boot, hence my having configured it directly (burg.cfg) all this time
    @fsckd
    Nothing in the logs other than the most recent installation. Your "haunted" idea may have some mileage, though :-0

  • Cannot install Arch on raid0 (kernel panics)

    I followed the Howto in the wiki to install Arch on a Raid 0 array, but when trying to boot I keep getting errors that boil down to "no filesystem could mount root" followed by a kernel panic.
    I modified the howto to my needs:
    - created a Raid 0 array using mdadm from logical partitions /dev/sda7 and /dev/sdb7. /dev/sda6 will be /boot and /dev/sdb6 will be swap (both not in raid, of course)
    - Put filesystems in place (tried Reiserfs and ext3 for the array; ext2 for /boot seems to be fine as the boot does initialize)
    - mounting of array to /mnt
    - Edit configfiles. Mkinitcpio is the important one, I feel:
    # vim:set ft=sh
    # MODULES
    # The following modules are loaded before any boot hooks are
    # run. Advanced users may wish to specify all system modules
    # in this array. For instance:
    # MODULES="piix ide_disk reiserfs"
    MODULES="pata_jmicron ata_generic ahci ata_piix sata_sil24 raid0"
    # BINARIES
    # This setting includes, into the CPIO image, and additional
    # binaries a given user may wish. This is run first, so may
    # be used to override the actual binaries used in a given hook.
    # (Existing files are NOT overwritten is already added)
    # BINARIES are dependancy parsed, so you may safely ignore libraries
    BINARIES=""
    # FILES
    # This setting is similar to BINARIES above, however, files are added
    # as-is and are not parsed in anyway. This is useful for config files.
    # Some users may wish to include modprobe.conf for custom module options,
    # like so:
    # FILES="/etc/modprobe.conf"
    FILES=""
    # HOOKS
    # This is the most important setting in this file. The HOOKS control the
    # modules and scripts added to the image, and what happens at boot time.
    # Order is important, and it is recommended that you do not change the
    # order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
    # help on a given hook.
    # 'base' is _required_ unless you know precisely what you are doing.
    # 'udev' is _required_ in order to automatically load modules
    # 'modload' may be used in place of 'udev', but is not recommended
    # 'filesystems' is _required_ unless you specify your fs modules in MODULES
    # Examples:
    # This setup specifies all modules in the MODULES setting above.
    # No raid, lvm2, or encrypted root is needed.
    # HOOKS="base"
    # This setup will autodetect all modules for your system and should
    # work as a sane default
    # HOOKS="base udev autodetect ide scsi sata filesystems"
    # This setup will generate a 'full' image which supports most systems.
    # No autodetection is done.
    # HOOKS="base udev ide scsi sata usb filesystems"
    # This setup assembles an ide raid array with an encrypted root FS.
    # Note: See 'mkinitcpio -H raid' for more information on raid devices.
    # HOOKS="base udev ide raid encrypt filesystems"
    # This setup loads an lvm2 volume group on a usb device.
    # HOOKS="base udev usb lvm2 filesystems"
    HOOKS="base udev autodetect pata scsi sata raid usbinput keymap filesystems"
    md=0,/dev/sda7,/dev/sdb7
    I also tried adding reisferfs to 'modules' and using rootfstype=reiserfs as a kernel parameters.
    - Install kernel
    - Chrooting into the basesystem and run mdadm -D -scan >> /etc/mdadm.conf
    - Editing menu.lst of an existing installation (Ubuntu, in which incidentally raid0 runs fine)
    title Arch Linux
    root (hd0,5)
    kernel /vmlinuz26 root=/dev/md0 ro md=0,/dev/sda7,/dev/sdb7
    What am I doing wrong? I know there's something about creating nodes, but I cannot find any useful information on it. Also, perhaps I am simply missing a module?
    Last edited by crakie (2007-06-05 17:31:09)

    Still no dice I cannot find anything out of order.
    lshdw:
    00:00.0 Host bridge: Intel Corporation|Memory Controller Hub (unknown)
    00:01.0 PCI bridge: Intel Corporation|PCI Express Root Port (unknown)
    00:1a.0 USB Controller: Intel Corporation|USB UHCI Controller #4 (unknown)
    00:1a.1 USB Controller: Intel Corporation|USB UHCI Controller #5 (unknown)
    00:1a.7 USB Controller: Intel Corporation|USB2 EHCI Controller #2 (unknown)
    00:1b.0 Audio device: Intel Corp.|ICH8 HD Audio DID (snd-hda-intel)
    00:1c.0 PCI bridge: Intel Corporation|PCI Express Port 1 (unknown)
    00:1c.2 PCI bridge: Intel Corporation|PCI Express Port 3 (unknown)
    00:1c.3 PCI bridge: Intel Corporation|PCI Express Port 4 (unknown)
    00:1c.4 PCI bridge: Intel Corporation|PCI Express Port 5 (unknown)
    00:1c.5 PCI bridge: Intel Corporation|PCI Express Port 6 (unknown)
    00:1d.0 USB Controller: Intel Corporation|USB UHCI Controller #1 (unknown)
    00:1d.1 USB Controller: Intel Corporation|USB UHCI Controller #2 (unknown)
    00:1d.2 USB Controller: Intel Corporation|USB UHCI Controller #3 (unknown)
    00:1d.7 USB Controller: Intel Corporation|USB2 EHCI Controller #1 (unknown)
    00:1e.0 PCI bridge: Intel Corp.|82820 815e (Camino 2) Chipset PCI (hw_random)
    00:1f.0 ISA bridge: Intel Corporation|LPC Interface Controller (unknown)
    00:1f.2 IDE interface: Intel Corporation|SATA Controller 1 cc=IDE (ata_piix)
    00:1f.3 SMBus: Intel Corporation|SMBus Controller (i2c-i801)
    00:1f.5 IDE interface: Intel Corporation|SATA Controller 2 cc=IDE (ata_piix)
    01:00.0 VGA compatible controller: nVidia Corp.|GeForce 7600 GT (vesa)
    03:00.0 Ethernet controller: Realtek Semiconductor|RTL-8168 PCI-E Gigabit Ethernet (r8169)
    04:00.0 Mass storage controller: Silicon Image Inc.|SiI 3132 PCI-X Serial ATA Controller (sata_sil24)
    05:00.0 Ethernet controller: Realtek Semiconductor|RTL-8168 PCI-E Gigabit Ethernet (r8169)
    06:00.0 SATA controller: JMicron Technologies, Inc.|JMicron 20360/20363 AHCI Controller (ahci)
    06:00.1 IDE interface: JMicron Technologies, Inc.|JMicron 20360/20363 AHCI Controller (ahci)
    07:02.0 FireWire (IEEE 1394): Texas Instruments|TSB43AB22 IEEE1394a-2000 OHCI PHY/Link-Layer Ctrlr (ohci1394)
    07:05.0 Multimedia video controller: Conexant Inc.|iTVC15 MPEG Coder (ivtv)
    005:001 USB Hub: Virtual|Hub (hub)
    005:002 USB Human Interface Devices: USB Gaming Mouse [/dev/input/mice] (usbhid)
    002:001 USB Hub: Virtual|Hub (hub)
    007:001 USB Hub: Virtual|Hub (hub)
    006:001 USB Hub: Virtual|Hub (hub)
    001:001 USB Hub: Virtual|Hub (hub)
    004:001 USB Hub: Virtual|Hub (hub)
    003:001 USB Hub: Virtual|Hub (hub)
    ---:--- Mouse: PS/2 Mouse port [/dev/psaux] (msintellips/2)

  • Install arch on a read-only filesystem

    Hi to all, I have an idea about installing arch in a particular way, a way that makes the system more secure.
    I want to install a host archlinux system on a hard disk or ssd but I want no data can be written to the storage. The host system will have a predefined set of programs and should use a ramdisk to store temporary data. It is something very similar to a ISO.
    The real computation will be handled through a series of virtualbox instances of linux ( the virtualbox images will be stored on an external hard disk, a read/write volume ).
    How could I achieve this? Through unionfs? AUFS? or some other thing?
    Last edited by pabloski (2011-02-16 16:18:11)

    I want to mount my sda2 read-only and union it with a tmpfs, so the machine is secure and the file system is the same every boot.
    I installed aufs3 with 3.2.6-1-aufs_friendly, I made a hook (as some-guy94 adviced), but it doesn't work.
    The code is:
    1. mkdir -p /root/ro /root/rw
    2. mount /dev/sda2 /root/ro
    3. mount -t tmpfs root.rw /root/rw
    4. mount -t aufs -o "dirs=/root/rw=rw:/root/ro=ro" root.union /
    At 2. it says: "mount: mounting /dev/sda2 on /root/ro failed: No such file or directory" Both files exist - I can list them just before the mount.
    3. & 4. work, but it doesn't matter as sda2 gets mounted rw on / right after (by initramfs's init, I gues).
    Can you help me with this, or point some useful howtos?
    Btw: is there a better way of debugging a hook, other than making the image and rebooting each change?
    Update: This is how they did it in larch: http://git.berlios.de/cgi-bin/gitweb.cg … cpio/hooks
    mount -t ext3 /dev/sda2 /root/ro works now.
    I used exec /sbin/switch_root as in larch3 hook and for loop from /lib/initcpio/init:109 to move /proc /dev /sys /run to the new root
    So the union mount works just fine now, my sda2/sbin/init & sda2/etc/rc.sysinit run, but the latter fails with following:
    * Mounting Root Read-Only - this is actually quite acceptable
    * Starting UDev Daemon
    * Loading Modules
    * Remounting Root Read/Write - acceptable as well
    After boot X opens and system freezes immediately (no reaction to keyboard, doesn't ping). No useful information in logs. I don't think system can run well without udev/modules. So this is udev not liking / mounted rw (as tmpfs is rw) or maybe /dev /proc /sys /run fault.
    I tried to make union mount only in rc.sysinit when /dev/sda2 is already mounted on /, but mount --move / other-dir fails.
    Any ideas what can be wrong?
    My code:
    run_hook ()
    read -p "Union mount root (y/N)? " answer
    if [[ "$answer" == "y" ]]; then
    modprobe aufs
    ro="/root/ro"
    rw="/root/rw"
    un="/root/un"
    rob="${un}/ro"
    rwb="${un}/rw"
    mkdir -p $ro $rw $un
    mount -t ext3 /dev/sda2 $ro
    mount -t tmpfs -o "size=20%" root.rw $rw
    mount -t aufs -o "dirs=${rw}=rw:${ro}=ro" root.union $un
    mkdir -p $rob $rwb
    mount --bind $ro $rob
    mount --bind $rw $rwb
    mkdir ${un}/media
    mkdir ${un}/sys
    mkdir ${un}/proc
    mkdir ${un}/dev
    /bin/mknod ${un}/dev/console c 5 1
    echo "rootfs / rootfs rw 0 0" >${un}/etc/mtab
    [ -z "${init}" ] && init="/sbin/init"
    if [ -e "${un}/${init}" ]; then
    mount
    read
    for d in proc sys dev run; do
    if [ -d ${un}/${d} ]; then
    mount --move /${d} ${un}/${d}
    else
    umount /${d}
    fi
    done
    exec /sbin/switch_root -c /dev/console ${un} ${init} ${CMDLINE}
    fi
    fi
    Last edited by kaos (2012-02-22 17:14:18)

  • Impossible to install arch in UEFI mode on my Acer Aspire S3-391

    Hi there,
    I am trying to install arch-linux on my Acer Aspire S3-391, which came with a pre-shipped Windows 8. I am trying to make a dual boot, so I would like to keep the UEFI mode at startup. However, my computer won't boot on the Arch Linux USB Flash drive when in UEFI mode : when plugged in, the key prevents the computer from loading anything. The "Acer" page keeps on reloading itself, without even letting me access the BIOS menu (In other words, the computer is blocked at "POST" phase when the installation media of arch is plugged in).
    Here's what I did to try and solve the problem  :
    1) of course, I disabled Secure Boot and hibernation in Windows 8.
    2) tried to boot in legacy bios. It works, and i could install arch this way : but as told before, i would like to install it in UEFI mode.
    3) Checked, re-checked and re-rechecked the installation media.
    4) tried to install Ubuntu in UEFI mode. It worked : the bootable key of Ubuntu was loaded, when the bootable key of arch is blocked. Why ? No idea...
    5) Installed Ubuntu, and tried to install Arch in UEFI mode from Ubuntu, following the tutorial "Install_from_Existing_Linux". No luck here : i was blocked at step "Testing if you are booted into UEFI mode" on the beginner's guide : I was not, and I couldn't find any solution in the tutorial.
    Any suggestions on what I should try next ?

    If you've already installed in BIOS/CSM/legacy mode, my recommendation is to install your EFI-mode boot loader and try it out. You'll need to use something else that does boot (such as Ubuntu), install the boot loader using the Windows bcdedit command (assuming you're dual-booting), or install the boot loader as EFI/BOOT/bootx64.efi (if you're setting up for Linux alone) to get it to work, though.

  • [SOLVED] external USB HDD fails to install arch w/boot device ERROR

    I've been working on installing arch linux via an external USB harddrive (specifically seagate free agent go 320GB) for 1 week now, and everytime I failed - until TODAY! thankfully I found this post, where user Dieter@be references this link, which displays BUG ID#17231 at the top titled "Can't boot LiveCDs 2009.08 (/dev/archiso doesn't show up)". the bug report states ::
    I can't boot the LiveCDs 2009.08, neither netinstall nor core.
    When it tries to access /dev/archiso it shows these messages:
    :: Waiting for boot device ...
    Waiting 30 seconds for device /dev/archiso ...
    ERROR: boot device didn't show up after 30 seconds ...
    Falling back to interactive prompt
    You can try to fix the problem manually, logout when you are finished
    ramfs$
    reading further thru this bug report, I found a very insightful post by Heiko Baums (cyberpatrol) where he says the following, and I quote ::
    Problem found. The link /dev/archiso wasn't created.
    After
    ramfs$ cd /dev
    ramfs$ ln -s sr0 archiso
    ramfs$ exit
    it continued booting correctly.
    And sg was also loaded after this. ;-)
    as you see, the bug report was for the CD version, not the USB version - yet, my issue with the USB bootdisk was the same, (no matter which boot disk I tried = netinstall, core, .img, .iso, etc) meaning I got the EXACT same error = "ERROR: boot device didn't show up after 30 seconds ..." ! well, I figured that I'd try one of the new fancy ISOs found @ http://build.archlinux.org/isos/ - specifically I use/used archlinux-2010.03.04-netinstall-x86_64.iso.
    upon running Unetbootin from windows 7, and choose to install the ISO archlinux-2010.03.04-netinstall-x86_64.iso to my first partition on my USB harddrive (that first partition being FAT32, and had already been set as bootable previously), that completed successfully. I rebooted, and choose to boot from USB drive, the ISOlinux bootloader came up as normal, I choose DEFAULT and off it went.... sure enough, it errored out at the same place as listed in the bug report ::
    :: Waiting for boot device ...
    Waiting 30 seconds for device /dev/archiso ...
    ERROR: boot device didn't show up after 30 seconds ...
    Falling back to interactive prompt
    You can try to fix the problem manually, logout when you are finished
    ramfs$
    this time though, I issued the following 2 commands ::
    ln -s /dev/sdb1 /dev/archiso
    exit
    from there, EVERYTHING worked as it should!
    to recap: the solution for me was create a symbolic link pointing /dev/archiso => to my partition which held the archlinux netinstall (which is where I told Unetbootin to install it to)! done and done. I felt this needed to be posted here, as I could not find this solution after MANY google searches, archlinux wiki searches, forum searches, etc. honestly, I think it would be prudent to have this tidbit of information added to the Install from USB stick archwiki page as a side note to those that may run into this issue.
    this is not the FIRST time I have run into this problem with a USB install of archlinux, but this is the FIRST time I found a fix! thanks to all the great posts I reference here, without this information I dont think I would have been able to install archlinux on my new alienware m11x laptop.
    -peace-
    PS: no amount of rootdelay=XX  nor pmedia=usb  nor usbdelay=XX would work in my above attempts either.
    Last edited by fnord0 (2010-03-12 04:54:26)

    FAT16 here. Parted Magic sees my USB drive as sdd. I tried your way and surprise, surprise, it didn't work.
    ln -sf /dev/sdd /dev/archiso
    mount -t vfat /dev/archiso /bootmnt
    mount : Invalid argument
    I thought maybe you meant mount -f vfat /dev/archiso /bootmnt instead. I tried it too, it resulted in a kernel panic.
    What else can I try besides installing from a IDE/SATA CD drive ? Because this issue is NOT solved. At least not for me. Wonder if "archlinux-2010.04.05-netinstall-i686.iso" from the here will solve it (really hope so).
    SOLVED IT HERE (with yet another image): http://bbs.archlinux.org/viewtopic.php?id=93645
    Last edited by DSpider (2010-04-17 14:21:27)

  • Installing arch on extended partition/logical drive

    hi there. i am a newbie to linux and about to install arch as my first linux installation.
    i am using vaio AR laptop already running xp and would like to keep it and have double boot without reinstalling xp.
    have 200gb hdd with recovery primary partition, system primary partition (where xp installed) and extended partition with one logical drive (D: ) of 100gb.
    i was considering deleting the logical drive (and the extended partition if necessary), which if i understand correctly should give me 100gb of unallocated space.
    i would then like to install arch on the 100gb of unallocated space.
    i would like to know if the way i am planning to go about it is possible, and whether i can install arch completely on one extended partition devided into logical drives.
    any comments or sugestions would be much appreciated...
    Last edited by o12357 (2009-09-04 12:45:18)

    I believe that is correct.  Grub has to have a reference to the md0 raid for booting.
    Please see
    http://bbs.archlinux.org/viewtopic.php?id=79306
    This solution to the boot problem with md0 should be helpful for your case since grub must be modified to accomodate the raid.
    I am not sure the data in your raid0 is appropo for your use in booting archlinux, however.  If I understand correctly, it is windows related data and not applicable to linux.
    If your raid0 is partitioned, it would be possible to establish a boot for each system using grub partition references differing for linux and windows systems.
    Thus, you would have grub entries complete for linux and another set complete for windows.
    I think AFAICT windows has to be first in the usual dual booting but am not an expert on that, not having used dual boot.  It may be somewhat different when using raid for booting dual systems.
    I suggest you read the wiki on dual boots.
    Perhaps you will get advice from others on the subject also.
    EDIT:  Your asumption that all OS'es will recognize the raid0 devices as a single drive does not apply to archlinux which does not autodetect raid arrays but must have initramfs populated with the raid data established by mdadm and initiated into initramfs by mkinitcpio.  Then during boot sequences , the array is assembled and enabled as a single drive,i.e., md0.  The boot sequence assembles all drives having identical UUID's in the raid array.
    Last edited by lilsirecho (2009-09-05 18:23:36)

  • Installing Arch on an SD card

    I already looked at the beginner's guide etc... I've scoured the forums a bit, and I've probably missed something, I won't mind being corrected after saying I couldn't find anything of much use.  I'm putting arch on my netbook but I don't feel like playing with the harddrive which I'd prefer to keep as the default windows installation.  Unfortunately the harddrive has 4 partitions on it so in order to use it at all I'll have to get rid of something.  Fortunately I have an SD card slot which I can go ahead and use (currently planning on using my 8GB card).  From what I understand I should put the /var partition on the harddrive so as to not ruin the card any faster than I have to.  I'm not entirely sure what I should do here, it's been a long time since I've had to install Arch, and I've never been good at it.  Any help is greatly appreciated.
    Thanks again,
    --Wes

    ewaller wrote:The link provided by lagagnon addresses CF cards on an IDE to CF converter.
    As the fellow who wrote the original draft of that link, I can assure that it holds equally valid for SD cards.  The only difference is that an SD card needs the mkinitcpio USB hook enabled.
    ewaller wrote:I cannot think of any laptop that does boot from internal SD readers.
    I can not think of any laptop that does not boot from internal SD.  I've only set it up on half a dozen or so, but my success rate as been 100%.  Nearly every laptop made in the last seven years can USB/SD boot.
    ewaller wrote:This laptop (HP Pavilion DV4 1227) has a SD reader, but will not boot from that reader.
    Always research large purchases to death.  Punch that laptop's name into google, and the third result is "Don't Buy the HP Pavilion...."
    Wesman26 wrote:I'm not entirely sure what I should do here.
    Don't worry about /var.  I've always had it write to the flash drive.  (I also replace my SD/CF cards every year and my hard drives every three.)  When you are installing Arch, enable USB booting.  That is the only critical step.  And follow those direction regarding mount flags, otherwise it will be dog slow.
    Right now I am typing this from a computer running entirely from a class 6 micro SDHC card.  I can swap it with the µSD card in my MP3 player or camera and boot a completely different OS.  Once I start thinking about all the places you can hide a chunk of plastic the size of a fingernail, it is hard not to whistle the "Mission Impossible" theme while using a computer.
    In short, running linux from SD cards is easy and fun.
    Last edited by keenerd (2010-01-08 14:11:30)

Maybe you are looking for

  • Multiple ID's on one iTunes account?

    Good golly Gee! Why is everything so difficult with apple?!?!?!?!?!!!!!! Ok, I feel a tiny bit better. My sons just bought used iPods and they like all the games I've downloaded, paid and free on my iPhone they've played for a long time. They want to

  • I recently updated Firefox and something called Fantistic Games has taken over my homepage and I can't get rid of it.

    I used to get a field of 9 options to open when I opened a new page by clicking on the + button on the right side of the Search tab. After I updated Firefox a couple of days ago, my homepage had been taken over by something called "Fantasti Games". I

  • Image Sequence Issue

    I've got some large pictures I've been asked to make into a sequence and retain as much of their quality as possible, they will be used in a PDF plan report. I started with Flash but it couldn't handle the full size images (5184x3456 - 72dpi). I've m

  • Calling MSP430 functions in MSP430-TI.dll using Labview

    Hi I have few questions about implementing the MSP430-TI.dll functions in LabVIEW and I greatly appreciate your help I would like to read MCU through JTAG and then update the firmware 1- I can see all the dll functions in LabVIEW but I couldn't find

  • Xs:group refs and "ORA-30936: Maximum number (1) of XML nodes exceeded'

    We registered a subset of the IBM DITA schemas in Oracle XDB. These schemas contain a lot of xs:group definitions where references to these groups contain "minOccurs" and "maxOccurs" atttributes, for instance: <xs:group name="category"> <xs:sequence>