Grub, UEFI, and encrypted partitions

I followed the tutorials on the Wiki regarding setting up luks encryption over LVM which worked fine. Part of this process involved getting grub to decrypt the root partition, which also worked. However, I later went and followed instructions for getting UEFI boot to work; I created a separate /boot partition, used grub-install, etc. I'm now in a weird state, though: grub is still using (and unlocking) the root partition and using whatever is in its /boot directory when it really should be using the /boot partition. I've managed to confuse myself enough through all this that I'm not sure what config files and commands I need to mess with to get grub to load the initramfs from the actual boot partition while not also screwing up the root partition that should be unlocked/mounted by systemd.
My common sense tells me that the latter has nothing to do with the former but it took me long enough to figure out the hack of copying everything in the boot partition to root's /boot just to get the thing booting again after a kernel update that I'd rather just ask here

tcdavis wrote:I'm now in a weird state, though: grub is still using (and unlocking) the root partition and using whatever is in its /boot directory when it really should be using the /boot partition.
UEFI and a dedicated /boot partition are separate things, and they are not dependent on one another. The problem is most likely coincidental.
Make sure your "root=" and "cryptdevice=" kernel parameters are correct. Edit /etc/default/grub, and use the UUID of the LUKS container on the new /boot partition, replacing the old UUID of the root filesystem. This should be the UUID of the LUKS container itself, not the filesystem contained within it. Use `cryptsetup luksUUID /dev/sda2` substituting sda2 with your /boot partition. This only applies to the kernel and is not directly related to GRUB, so it's just a precautionary measure.
Make sure /boot is mounted, and regenerate grub.cfg:
mount /boot
grub-mkconfig -o /boot/grub/grub.cfg
Delete the contents of /boot on the root partition to prevent confusion:
umount /boot
rm -r /boot
mkdir /boot
mount /boot
Also make sure your /boot partition is being mounted (via crypttab and a keyfile) automatically at boot, or you will run into problems later on.
Strike0 wrote:If you, in your first attempt, installed grub to the MBR and your bios is set to dual legacy/uefi, the grub bios may take precedence now. You should boot the machine/install ISO in pure efi mode before executing the grub install for uefi and best wipe the grub bios which probably installed itself to sectors before the first partition.
I don't know enough about the GRUB internals to say whether or not the UUID of the /boot partition is embedded in GRUB's UEFI stub, but in theory the following commands should overwrite both the BIOS boot loader and UEFI.
mount /boot
grub-install --target=i386-pc --recheck
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
This way GRUB should use the correct /boot no matter if it is booting in BIOS or UEFI mode.
If these instructions don't solve your problem, please specify what stage of the boot process is failing, and what you saw prior to the boot failure (e.g. did you get a GRUB rescue shell? Did you see the GRUB menu? Did GRUB indicate an incorrect UUID?)

Similar Messages

  • Gummiboot and encrypted / partition

    Hi,
    This is my first experience with Arch, with GPT, with LUKS, and with gummiboot, so I have a lot of sources of ignorance. 
    I am trying to set up a LUKS-encrypted system with encrypted swap.  I have followed the beginner's guide and the dm-crypt with LUKS guide pretty carefully and have no problem creating the encrypted partitions.  However, I don't quite understand how to construct the gummiboot entry for booting into the system. 
    the gummiboot wiki page has some instructions:
    An example entry for encrypted root (dm-crypt with LUKS)
    $esp/loader/entries/arch-encrypted.conf
    title          Arch Linux (Encrypted)
    linux          \\path\\to\\vmlinuz-linux
    options        initrd=\\path\\to\\initramfs-linux.img cryptdevice=UUID=<UUID>:luks-<UUID> root=UUID=<luks-UUID> rw
    In the encrypted example, not that the initrd is in options -- this does not appear to be discretionary at this time. Note that UUID is used for in this example. PARTUUID should be able to replace the UUID, if so desired.
    much of this is foreign to me.  In particular, how do I identify the various UUID's:
    cryptdevice=UUID=<UUID>:luks-<UUID> root=UUID=<luks-UUID>
    are those all the same UUID?  Or is there a difference between the plain  UUID and the luks-UUID?  And how do I get either of those pieces of information? 
    also, I am trying to speed things up a little by using this install script from the web:
    https://github.com/altercation/archston … chstone.sh
    however, a bunch of stuff there seems like it's out of date (lots of referenes to rc.conf, for instance!). 
    I'm wondering if there are other inconsistenies as well I should be careful of. 
    Thanks,
    Matt

    yes, this random script was a bad idea and I've stopped using it.  That said, I really don't understand the UUID stuff in my initial question, despite having gone through the beginner's guide & stuff.  In fact, the whole gummiboot stanza is odd to me: 
    An example entry for encrypted root (dm-crypt with LUKS)
    $esp/loader/entries/arch-encrypted.conf
    title          Arch Linux (Encrypted)
    linux          \\path\\to\\vmlinuz-linux
    options        initrd=\\path\\to\\initramfs-linux.img cryptdevice=UUID=<UUID>:luks-<UUID> root=UUID=<luks-UUID> rw
    what is with the escaped windows-looking  backslashes -- shouldn't this read more like:
    title          Arch Linux (Encrypted)
    linux          /vmlinuz-linux
    options        initrd=/initramfs-linux.img cryptdevice=UUID=<UUID>:luks-<UUID> root=UUID=<luks-UUID> rw
    ... and is there a way to find the relevant UUID's somewhere?  Thanks,
    Matt

  • Dual boot Arch / Windows 8 with grub, uefi and gpt

    hi,
    (my aplogies for my bad english)
    after a fresh installation without worries I have one last problem : starting w8
    Partitions :
    [root@ToshCM christian]# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 0.8.7
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 1465149168 sectors, 698.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BAE3660C-FC6F-11E1-9C45-C6B1BB081CD7
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1465149134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 3757 sectors (1.8 MiB)
    Number Start (sector) End (sector) Size Code Name
    1 2048 923647 450.0 MiB 2700 Basic data partition
    2 923648 1456127 260.0 MiB EF00 Basic data partition
    3 1456128 1718271 128.0 MiB 0C01 Basic data partition
    4 1718272 1230518271 585.9 GiB 0700 Basic data partition
    5 1445343232 1465147391 9.4 GiB 2700 Basic data partition
    6 1230518272 1250998271 9.8 GiB 8200
    7 1250998272 1291958271 19.5 GiB 8300
    8 1291958272 1445343231 73.1 GiB 8300
    2 = efi (fat32)
    4 = Windows (ntfs)
    6 = swap
    7 = /
    8 = /home
    EFI partition is mounted in /boot/efi
    [root@ToshCM christian]# grep efi /etc/fstab
    UUID=7CD3-EE8E /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
    For now I have a grub that works perfectly without Windows
    Now I try to follow this page
    [root@ToshCM christian]# grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    7CD3-EE8E
    [root@ToshCM christian]# grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2
    I put the result in /etc//grub.d/40_custom
    [root@ToshCM christian]# cat /etc/grub.d/40_custom
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    I regenerates grub.cfg
    grub-mkconfig -o /boot/grub/grub.cfg
    I check the result in /boot/grub/grub.cfg
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    ### END /etc/grub.d/40_custom ###
    After reboot I can see a fine line with Windows but it has no effect, neither start nor error message
    The computer is a Toshiba Satellite C855-1TM
    In the BIOS Advanced page "Boot Mode" is [UEFI Boot]
    In the Security page "Secure Boot" is [Disabled]
    Thanks in advance

    vintherine wrote:
    the.ridikulus.rat wrote:
    @vintherine: Everything you mentioned in the 1st post is correct. In your case the correct commands should be:
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
    grub-mkconfig -o /boot/grub/grub.cfg
    Thanks. I've tried that, get now a single line with Windows, which does not work
    EDIT: Are you able to boot Windows independent of GRUB, ie. directly from the firmware boot menu?
    I've tried F12 key, found a menu, started on the HD, found a new menu corresponding with the EFI directories (arch_grub, Microsoft....). Microsoft entry sent me on... grub menu
    EDIT: Can you try (note the extra line : "set gfxpayload=keep")
    It's time for diner (i'm in France). I'll see this in the next hour.
    Many thanks
    Seems like the actual Windows bootmgfw.efi was overwritten by grubx64.efi or something else. In the boot menu Windows's entry (created by Windows installer) is usually titled "Windows Boot Manager".
    EDIT:
    Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.
    Last edited by the.ridikulus.rat (2013-09-27 18:29:09)

  • OpenSUSE - Arch switch: encrypted partitions, keeping /home and other

    Hello,
    I am considering switching from openSUSE to Arch -- I want to gain performance, avoid releases and try something new -- but have some doubts/questions. I would appreciate if you could help me a bit with resolving them :)
    i. From what I see on the fora some of you are (ex) SUSE users so... will I miss anything?
    ii. Should I expect any problems in general?
       a) I am using nVidia proprietary drivers and, despite all downsides, would like to keep doing so. Are there any problems regarding installation or keeping them up to date?
       b) Is it possible to use s2ram and s2disk or obtain working counterpart(s), as, I hear, there are some problems with those?
       c) Is it possible to install software from debs and/or rpms? Possibly without extracting and moving files manually?
       d) Is it safe to assume that hardware and all applications not specific to any distribution will work just as well as they do on SUSE? I know, Linux is Linux but still.
    /edit:   e) Does getting fonts to be displayed properly takes a lot of tweaking? This problem does not exist on SUSE but on other distros it used to be a pain.
    iii. I have SUSE installed on encrypted partitions (with luks and /dev/mapper so it's pretty similar to setup recommended for Arch in that matter) and would like to avoid reencrypting as well as keep /home untouched. Is it possible and not too complicated?
    (I have seen http://wiki.archlinux.org/index.php/LUKS_Encrypted_Root, http://wiki.archlinux.org/index.php/Off … tall_Guide and http://wiki.archlinux.org/index.php/Ins … ing_Linux)
    Any additional information and comments are welcome.
    Last edited by skx (2009-02-16 15:36:33)

    quarkup wrote:ii)
    a) No problemo. I use nVidia drivers too for my 6800go, with no issues.
    Inxsible wrote:ii c) [....] I think there are packages in AUR, which can help you convert them to an Arch PKGBUILD and then install them.
    Thanks.
    bgc1954 wrote:i)
    Well, if you used suse for any length of time, you might miss the incredible slowness of yast as compared to pacman. :D
    YaST is not that slow anymore ;)
    What about the encryption part? That's the one that makes me anxious.
    Last edited by skx (2009-02-16 15:50:58)

  • (SOLVED)Toshiba P850 UEFI and issues with bootloaders

    So I've been using Arch for over a year and a half and have installed it on 10+ systems. I got a new laptop in January 2013 which has a UEFI motherboard (I hate Intel) And ive tried installing Arch from pure memory and also from the beginners guide, the first day I got the laptop I installed Arch in 15 minutes with NO issues, now all of a sudden when I boot into UEFI (For some reason legacy support which is called "CSM" Does not seem to work with Arch, so I must use UEFI, if you know a way around this let me know) on the live disk, install goes successful, but when I try and install GRUB (Not grub-legacy) it says "UEFI Commands are not supported on this device" I read the article in the wiki about starting the kernel module, and I did that, install went successful with GRUB and I was able to make my grub file install to /boot/efi/EFI/grub.cfg. When I try and boot up it takes me to a grub screen for about 2 seconds, then reboots, then shows grub for 2 seconds, then reboots, etc..... And the grub menu that pops up ONLY says "grub" twice, it doesn't display any information as to what its going to load, so it seems like it failed. I DID change the root directory which is sda4, and I still get this issue.
    My partitions are:
    sda1 /boot 300MB
    sda2 /boot/efi 700MB
    sda3 SWAP 2048MB
    sda4 / (the remaining amount of my 1TB HDD)
    Does anyone have any tips? I really need to get this working.
    EDIT: Also, I have tried SysLinux as well, that didn't work either. I don't care what bootloader I use as long as it can boot Arch! Ive currently got Debian installed and for some reason that's failing as well, but that disables my screen due to a kernel issue, I see the module fail to load in SystemD with Debian and it goes out, so I need Arch. Debian isn't that great anyways IMHO
    SOLVED: Just installed via CSM instead. Took me some work arounds but i finally got it installed.
    Last edited by Kitkin15 (2013-12-20 07:43:32)

    grub-install --target=x86_64-efi --efi-directory=/boot/efi/ --bootloader-id=grub --recheck --debug
    It told me to do that HERE
    First, mount the ESP at your preferred mountpoint (usually /boot/efi, hereafter referred to as $esp). On a first install, you will need to mkdir /boot/efi, if that's where you want to mount it.
    Now, install the GRUB UEFI application to $esp/EFI/grub and its modules to /boot/grub/x86_64-efi:
    # grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck --debug
    The way I understand it is that I still needed /boot to be the MBR boot partition, then /boot/efi as the UEFI partition so I can build compatibility with my legacy support later on, right now that's an even bigger pain as it doesn't fully work (After I get it running with UEFI I can tinker with it, if I cant get it running then ill have to wait for a BIOS update).
    Also, ive tried the Alternative method listed below that and it still didn't load GRUB like it should have, same original error
    Also, right now im trying to install with just using these partitions:
    mkfs.fat -F32 /dev/sda1 #EFI BOOT 700MB
    mkswap /dev/sda2 #SWAP 2048MB
    mkfs.ext4 /dev/sda3 # / Remaining amount of my 1TB HDD
    Right now im going to wipe my HDD and then try and install using GummiBoot, I had it all correct but my partitions were not GPT so it didn't work (Which is most likely why GRUB failed, I don't know too much about the differences but from what I know that's what did it) Now when I try to erase and re-partition using a GPT tool it gives me an error saying its not possible to partition /dev/sda or something along the likes of that, im going to see if I can try gparted live later tonight or tomorrow instead of the one they use in the beginners guide.
    Im honestly confused as to how I got it running earlier this year when I set it up lmfao. I know I used cfdisk to partition and was still using UEFI.
    Last edited by Kitkin15 (2013-12-18 22:05:24)

  • Install Arch Linux with UEFI and GPT

    Hi, I purchased a new laptop and I created a partition with Windows 8 (default OS on laptop) and another partition where I want to install Arch Linux.
    When I tried to install Arch Linux not boot from CD. After searching in Google I downloaded the latest Arch Linux ISO (2012-12-01) and tried again.
    This time CD started without problems but when I used cfdisk showed an error with GPT partition. I went back to search in Google and I read about gdisk and gfdisk and I try it but when I partitioning to install Arch Linux partition show that may cause damage. I searched and searched without success and I wonder if there is a Arch Linux GPT install guide or if someone knows how to install Arch Linux with GPT and a Windows 8 partition in UEFI.
    Thanks and regards.

    Hi again, finally I got "install" Arch Linux but when I reboot the follow message appears:
    "No Booteable Device, Hit any key."
    I don't know if I broke Windows Boot Manager, UEFI or both...
    I tried to reinstall GRUB but was unsuccessful.
    Can anyone help me?
    Thanks and regards.

  • Link to a file in encrypted partition

    Hi all,
    I have an encrypted partition with some files I use regularly.  If I mount the partition, I can make a shortcut to files by dragging them onto the dock.  If I click the icon on the dock, and the encrypted partion is not mounted, I get prompted for the password and the partion mounts and the file opens.
    I'd like to put several of these shortcuts in a single folder on my dock.  Just dragging and dropping does nothing.  Any thoughts?

    So I solved this by having an applescipt call a bash script.  Kind of a silly round-about way to do it, but it works.

  • Additional, encrypted partition mounted as /Users

    Recently I removed DVD-ROM drive from my MacBook Pro and installed 60GB SSD for system (in regular HDD bay) and my old HDD instead of DVD drive.
    My plan is to use fast SSD drive for system and the HDD for data.
    I would like to have my HDD partition mounted as /Users so all users' home directories are stored on HDD.
    I read this article: http://www.red-sweater.com/blog/1935/lions-whole-disk-encryption but it seams there is a problem with logging in if the user's home directory resides on separate encrypted partition.
    My question is:
    Is there any chance I can have "fully functional" /Users directory mounted as additional encrypted partition?
    Thanks,
    Mike

    Hi Linc,
    Thanks for your answer.
    No, because the Users volume would already have to be unlocked and mounted before you could log in, and that's impossible.
    I don't think it is impossible. I would reather say: "Apple makes it difficult to do".
    I barely see any problem with mounting other partitions on the system level during boot.
    The question is: "How hard is it to do that now?"
    The second question is: "When (and how) Apple will make it easier?"
    The best you could do would be to log in, mount the volume as root at /Users, then log out and log in again. I wouldn't recommend that you try this.
    Yeah... I don't feel like log in two times. I wouldn't recommend it either.
    I have another idea which is:
    1. Mount addtitional encrypted partition as /Volumes/Whatever
    2. Create directories like:
    /Volumes/Whatever/Documents
    /Volumes/Whatever/Pictures
    /Volumes/Whatever/Music
    /Volumes/Whatever/Library
    3. Mount these directories in places under /Users/MyUser/... during login.
    So there are other questions:
    1. How to do it the "Mac way"?
    2. There are maybe some directories which probably can not be mounted this way as its content can be necessary for login process to perform (probably some subdirectories of Library). Is it the case?
    Cheers,
    Mike

  • Solaris 10x86 and grub, bootloading and how to add new disk

    In the latest version of Solaris 10 (1/06) it now uses grub to do the bootloading.
    I cannot get grub to create a new partition on my new second disk.
    BIOS sees my disk.
    At first "format" would not see the disk. I ran "reboot -- -r" to fix this.
    Now, I go into the grub shell with /boot/grub/bin/grub and attempt to run "partnew" -- the grub command to add partitions. It fails.
    One of the arguments for 'partnew' is TYPE. However, I've googled my fingers to death, and nowhere can I find out what number I should use in type. The grub docs only say it should be a number between 0 and 0xff.
    I want to multi-partition the second disk for linux/solaris/and or windows.
    What if I take out disk1 containing solaris, move disk2 into that slot, then insert the windows installation cd and let it partition the disk.? Then put it back in slot 2....

    Why are you trying to partition the disk with 'grub'? Since you've completed the installtion you can use 'fdisk' directly.
    However I wouldn't bother. I'd just let the installer of whatever OS you're putting on do the right thing. Either Linux or Windows could partition it as you're installing.
    Then you could go back and edit grub if you needed to so that they would boot properly.
    This page talks about multibooting some different operating systems. You dont need to use it as a recipe, but you might find some of the concepts handy.
    http://www.sun.com/bigadmin/features/articles/multiboot_laptop.html
    Darren

  • Screwed up MBR and boot partition, can't fix it [SOLVED]

    Hi,
    I have been defeated. Been trying to fix my computer the whole day and know I'm lost.
    It's a long story, but my whole system got screwed when I tried installing windows on top of arch (I didn't get it to install, but I don't care anymore).
    I was able to install GRUB2, I tried configuring it with grub.cfg , but when trying to boot it says it's missing kernel, boot partition has linux2.6, and I was using linux 3, I'm not really sure how to get the kernel I was using, should it be in my root partition? .
    I'd like to get my system as it was before, I have root , var and home partitions and not sure how.
    Thanks
    Last edited by exuberant (2011-12-31 10:27:47)

    Thanks for your reply.
    I was using Arch, I last updated a few days ago.
    The kernel that's on the boot partition is from a debian live cd I had laying around.
    It is not possible I have more than one boot partition. I have 1 hard drive, but plenty of free space.
    Windows wanted to use the start of my disk, so I used gparted to move 20 gb free space at the beginning. Creating a partition in the beginning also caused all partitions numbers to move up (sda2->sda3), when I gave up on windows, I tried moving everything forward like it was before, but it didn't work. Then I remembered that when installing grub, installers check for other mount points, but that didn't work, and instead overwrote my boot partition. So know I've got a temporary debian system installed(sda9) and a boot partition that won't boot Arch.
    This is my fdisk output: sda5 is arch sd6 var and sd7 home
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000080
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          12       96358+  83  Linux
    /dev/sda2              13         401     3124642+  82  Linux swap / Solaris
    /dev/sda4            2744       14648    95619073    5  Extended
    /dev/sda5            2744        4203    11719680   83  Linux
    /dev/sda6            4239        5212     7815168   83  Linux
    /dev/sda7            5227       10326    40957952   83  Linux
    /dev/sda8           10393       13432    24411136   83  Linux
    /dev/sda9           13432       14648     9764864   83  Linux

  • Suspend to ram and encryption

    Hi,
    I installed Arch on my netbook with LUKS encryption on the /home partition.
    I frequently use suspend to RAM on this netbook, but I find quite insecure the fact that if I suspend the netbook and then resume later, an attacker could have access to all my data unencrypted.
    What would be the proper way to use suspend to RAM and encryption?
    Would it be possible to prompt for a passphrase to mount the /home encrypted partition
    when waking up from suspend?

    I suppose you are too much, you really shouldn't hold your breath
    If there is any option for changing where the memory is remapped to you may want to try a few different values and see if it makes any difference.

  • [SOLVED] Cloning boot and var partitions to a new drive for booting

    Ok first of all here's my setup:
    fakeraid (dmraid) / and home on an OCZ Revodrive
    boot with GRUB on a flash drive (since fakeraid doesn't support grub)
    var and downloads/media folder on a 500GB WD Caviar drive
    When I originally installed Arch I had the Caviar drive in my home server in a RAID5 array, so that's why I opted to install boot and grub on a flash drive simply for booting.  Now that I have the drive in my desktop I've cloned the flash drive's partitions and MBR using dd:
    #dd if=/dev/sde of=~/MBR.img bs=512 count=1
    #dd if=/dev/sde1 of=~/boot.img
    #dd if=/dev/sdc1 of=~/var.img
    I then backed up my downloads/media partition, then removed the partition table, then used dd to put the img files on the Caviar drive.
    #dd if=~/MBR.img of=/dev/sdc bs=512 count=1
    #dd of=~/boot.img of=/dev/sdc1
    #dd of=~/var.img of=/dev/sdc2
    I also created labels for the filesystems and put those in fstab.
    I'm able to mount both partitions, however I can't boot from the drive.  I get a 'grub hard disk error' (no error number) when I put it as my first drive in the BIOS. 
    I can still use the flash drive as the first hard drive in the BIOS and boot from it, then it mounts the dmraid root partition and boots successfully.  It is also able to mount the var and boot partitions in fstab. 
    Basically the only problem is that the MBR is somehow wrong.  I then tried booting back into an Arch live USB and installing GRUB from the prompt:
    grub
    grub>setup (hd4,0) (in this case the Caviar drive's boot partition was /dev/sde1
    So essentially what I'm asking is how GRUB handles the MBR.  Is it specific to the partition table of the drive in which it resides when it's originally installed?  For instance, since I had an 8GB flash drive with 2 partitions when I installed GRUB, is the backed up MBR no good for a 500GB drive with 3 partitions?
    I have everything backed up so I can start with a fresh /boot and /var if need be....I'm just not sure where to start. 
    Thanks in advance.
    Last edited by DarksideEE7 (2011-02-13 23:25:31)

    Sorry, I forgot to mention that I tried to install GRUB from the GRUB shell in a live Arch USB.  It failed on a few non-critical parts, and succeeded on the last part. I'm going to try again shortly, possibly I did something wrong.  GRUB is able to find the stage files using:
    #grub
    grub>find /grub/stage1
    grub> find /grub/stage1
    (hd0,0)
    (hd5,0)
    grub>
    (hd0,0) is the desired boot drive, while (hd5,0) is the current bootable flash drive with /boot and GRUB installed.
    Here is the output of fdisk -l:
    WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
    Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
    256 heads, 63 sectors/track, 242251 cylinders, total 3907029168 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: 0x00000000
    Device Boot Start End Blocks Id System
    /dev/sde1 1 3907029167 1953514583+ ee GPT
    Disk /dev/sdb: 60.0 GB, 60022480896 bytes
    255 heads, 63 sectors/track, 7297 cylinders, total 117231408 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: 0xedb72db9
    Device Boot Start End Blocks Id System
    /dev/sdb1 * 2048 206847 102400 7 HPFS/NTFS
    /dev/sdb2 206848 117227519 58510336 7 HPFS/NTFS
    Disk /dev/sdd: 40.0 GB, 40018599936 bytes
    255 heads, 63 sectors/track, 4865 cylinders, total 78161328 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: 0x00000000
    Disk /dev/sdd doesn't contain a valid partition table
    Disk /dev/sdc: 40.0 GB, 40018599936 bytes
    32 heads, 32 sectors/track, 76329 cylinders, total 78161328 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: 0xb8372fcd
    Device Boot Start End Blocks Id System
    /dev/sdc1 32 21484543 10742256 83 Linux
    /dev/sdc2 21484544 156317695 67416576 83 Linux
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x8497e059
    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 206847 102400 83 Linux
    /dev/sda2 206848 42149887 20971520 83 Linux
    /dev/sda3 42149888 976773167 467311640 83 Linux
    Disk /dev/dm-0: 80.0 GB, 80035053568 bytes
    32 heads, 32 sectors/track, 152654 cylinders, total 156318464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 65536 bytes / 131072 bytes
    Disk identifier: 0xb8372fcd
    Device Boot Start End Blocks Id System
    /dev/dm-0p1 32 21484543 10742256 83 Linux
    Partition 1 does not start on physical sector boundary.
    /dev/dm-0p2 21484544 156317695 67416576 83 Linux
    Disk /dev/dm-1: 11.0 GB, 11000070144 bytes
    255 heads, 63 sectors/track, 1337 cylinders, total 21484512 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 65536 bytes / 131072 bytes
    Alignment offset: 49152 bytes
    Disk identifier: 0x00000000
    Disk /dev/dm-1 doesn't contain a valid partition table
    Disk /dev/dm-2: 69.0 GB, 69034573824 bytes
    255 heads, 63 sectors/track, 8392 cylinders, total 134833152 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 65536 bytes / 131072 bytes
    Disk identifier: 0x00000000
    Disk /dev/dm-2 doesn't contain a valid partition table
    Disk /dev/sdf: 8086 MB, 8086618112 bytes
    249 heads, 62 sectors/track, 1023 cylinders, total 15794176 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: 0x8497e059
    Device Boot Start End Blocks Id System
    /dev/sdf1 * 62 200693 100316 83 Linux
    /dev/sdf2 200694 15794175 7796741 83 Linux
    I'm using dmraid, so just to be clear I've configured the raid using:
    #modprobe dm_mod
    #dmraid -ay
    Then I saw the array stored in /dev/mapper/silXXXXX.  I then created partitions for /boot, /, and home.  At that time I was hoping to get GRUB working with the AUR package grub2-dmraid.  I wasn't able to get it working for some time, so I just went ahead and installed boot and GRUB to a separate USB flash drive.
    Here is the output of df -h:
    Filesystem Size Used Avail Use% Mounted on
    udev 10M 268K 9.8M 3% /dev
    /dev/mapper/sil_bgbgdjaddicbp1
    11G 5.3G 4.3G 56% /
    shm 6.0G 584K 6.0G 1% /dev/shm
    /dev/mapper/sil_bgbgdjaddicbp2
    64G 38G 23G 63% /home
    /dev/sda1 95M 16M 75M 18% /boot
    /dev/sda2 19G 142M 19G 1% /var
    /dev/sda3 439G 148G 269G 36% /home/l33/Torrents
    none 1000M 132K 1000M 1% /tmp
    shm 6.0G 584K 6.0G 1% /dev/shm
    /dev/sde1 1.8T 1.1T 665G 62% /mnt/Green
    and cat /etc/mtab
    proc /proc proc rw,nosuid,nodev,noexec,relatime
    sys /sys sysfs rw,nosuid,nodev,noexec,relatime
    udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1022975,mode=755
    /dev/mapper/sil_bgbgdjaddicbp1 / ext4 rw,noatime,barrier=1,stripe=32,data=ordered
    devpts /dev/pts devpts rw 0 0
    shm /dev/shm tmpfs rw,nosuid,nodev 0 0
    /dev/mapper/sil_bgbgdjaddicbp2 /home ext4 rw,noatime 0 0
    /dev/sda1 /boot ext2 rw 0 0
    /dev/sda2 /var reiserfs rw,noatime 0 0
    /dev/sda3 /home/l33/Torrents ext4 rw,noatime 0 0
    none /tmp tmpfs rw,nosuid,nodev,noatime,size=1000M,mode=1777 0 0
    shm /dev/shm tmpfs rw,nosuid,nodev,size=6G 0 0
    rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    nfsd /proc/fs/nfsd nfsd rw,noexec,nosuid,nodev 0 0
    /dev/sde1 /mnt/Green ext4 rw 0 0
    Also I don't have a /proc/mdstat.  That's only for mdadm RAID setups, right?  It's been quite some time since I've used mdadm so I can't remember.
    EDIT:
    So I booted into a live Arch USB and entered the grub shell.  I ran:
    #grub
    grub> root (hd3,0)
    Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd3)
    Checking if "/boot/grub/stage1" exists.....no
    Checking if "/grub/stage1 exists.......yes
    Checking if "/grub/stage2 exists.......yes
    Checking if "/grub/e2fs_stage1_5 exists....yes
    Running "embed /grub/e2fs_stage1_5 (hd3)".....25 sectors are embedded.
    succeeded
    Running "install /grub/stage1 (hd3) (hd3))1+25 p (hd3,0)/grub/stage2 /grub/menu.lst".......succeeded
    Done.
    Last time I recall more errors than this, then it reporting that one was a non-critical error, so I think the problem may be solved.  More to come.
    Last edited by DarksideEE7 (2011-02-13 23:18:44)

  • Btrfs and encrypted volumes

    I suppose this is a rather complicated question, but hopefully i can word it well enough:
    If i have a btrfs volume on an encrypted partition (using dm-crypt/luks), and i want to expand it to another physical drive, would i need to setup an encrypted volume on the second drive as well, or would the first volume's encryption apply to the 2 (once i've run btrfs-vol -b).
    More precicesly should i run "btrfs-vol -a /dev/mapper/encrypted-vol2 /media/foo" or would "btrfs-vol -a /dev/sdc1 /media/foo" be better.
    I've already attempted doing so with both partitions encrypted, which results in a significant amount of CPU usage required to access the drives and potentially might slow things down more then needed. I'd like to know if doing it on an unencrypted partition would work while still maintaining the encryption.

    I have no specific knowledge about btrfs, but with my understanding of how device mapper works in general, I would say you would find yourself with some files being encrypted and some files not.
    The filesystem is just seeing an underlying block device, there's no difference for it between accessing a 'raw' block device (like a partition) and a device-mapper block device (like an encrypted partition). I doubt btrfs does any extensive check on the nature of the block device before using it, because that wouldn't be really portable.

  • Encrypted partition

    hi
    i have an encrypted partition use by suse
    is there a way to use it with arch linux?
    thanks

    Generally you would use the same method you (or suse) uses to mount and unlock the encrypted partition.
    If you use Luks for the encryption with dm_crypt you could simply run:
    cryptsetup luksOpen /dev/hdaX name_of_partition
    mount /dev/mapper/name_of_partition /partition_mountpoint
    To do all of this atomatically you would need to edit /mnt/etc/crypttab and enter the needed information.
    Here are two wiki entries concerning LUKS with Arch, they do not directly relate to what you need but you could use some pieces of it.
    LUKS Encrypted Root
    RAID Encryption LVM
    Most of the above is only valid when you're using LUKS I suppose. I also can't say anything about other methods because I never used them.

  • Create data partition and ubuntu partition

    I would like to create 2 more partitions on a ThinkPad x230t tablet: one partition for all my files and other partition to install ubuntu OS.
    According to Disk Management the computer already has the following partitions:
    SYSTEM_DRV              Simple, Basic, NTFS, Healthy(System, Active, Primary Partition)
    Windows7_OS(C        Simple, Basic, NTFS, Healthy(Boot, Page File, Crash Dump, Primary Partition)
    Lenovo_Recovery(Q   Simple, Basic, NTFS, Healthy(Primary Partition)
    I have read that there is a limit to the number of primary partitions allowed and that partition type and placement matter.
    Any suggestions on how to proceed are welcome.
    Thanks.

     - As I read, I guess GRUB makes the recovery button useless? I don't want to lose my licensed Vista, so what can you suggest me to do?
     I think it will work. At least if it doesn't you may reinstall Rescue and Recovery.
    After shrinking C: drive, it complains about not being able to find winload.exe and does not open
    You have to recover the loader. I used a Windows Vista bootable DVD for this purpose.

Maybe you are looking for

  • Data migration of open production order

    Hello SAP gurus, Please advise me about the steps that should be followed for data migration of open production order from legacy to SAP. Regards, Anand

  • Need help in work order save BADI and create BAPI

    hi expert Our issues are below list 1. When release and save the work order ,the standard BADI(WORKORDER_UPDATE) have not the parameters about service information . (for this issue , chunfai had give a solution ,we are testing it ) 2. When we create

  • Hyperlinks in epub document don't work on sony reader for pc

    I have downloaded a document wich contains hyperlinks. On Sony reader for PC it doesn't work, while it does on others ereaders I have tested. Why?

  • Low Speed after apparent fix

    Hi there,  Recently (The past 5 - 6 weeks) i have been experiencing very low internet connection speeds, im used to 3.30mb down and 0.80mb up and a ping of around 32 to 42. 2 weeks ago a made a call to BT technical support that helped me work out wha

  • Install fails in upgrade to CS6

    Each time I try to install I get an error msg. The error summary says the directory cannot be created and already exists. I delete and try again with the same result. I have PS CS4 loaded and am trying to install the upgrade. I think the error code i