|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] Ubuntu Alternate installer, RAID1 & LVM
|
> Date: Fri, 16 May 2008 02:20:34 -0400
> From: JP Vossen <jp@jpsdomain.org>
> Subject: [PLUG] Ubuntu Alternate installer, RAID1 & LVM
>
> How do I hijack /etc/apt/sources.list if using the Ubuntu Alternate CD?
> I ALT-F2'd but there's no apt/ in /etc/. I know it gives you a box to
> specify a proxy, but I'm using a local approx and I don't think that
> works like the proxy that box is expecting. (I didn't actually try it
> though.)
I poked around with the preseeding stuff, but didn't get anywhere...
But as I can tell passing "http://aptproxy:9999/" when the installer
asks for a proxy server Just Worked. Cool.
> Date: Fri, 16 May 2008 05:39:10 -0400
> From: jadoba@jadoba.net
>
> If possible with the Ubuntu installer, configure two RAID arrays, one
> solely for /boot and the other for LVM - makes a hell of a difference
> compared to 'dd if=/dev/sda1 of=/dev/sdb1' after every kernel upgrade or
> initramfs change.
I was gonna use rsync, but dd sounds better. Sort of. I tried
something below, which didn't work, but it's not quite what you
suggested. I'll try mirrored (md0 = /boot, md1 = /) + LVM next. Or did
you mean something else?
> Never tried that many layers of complexity (RAID1, then Encryption, then
> LVM) but try it, I doubt that it will fail. As long as /boot is not
> encrypted it should pretty much just work!
This, I did try, but it didn't work. It let me do it but only from the
Alternate CD, the Desktop CD doesn't have the RAID, LVM or Encryption
options. Pity about the encryption one! But after all that, it was
unable to install LILO [sic] and the half-installed GRUB didn't work.
Neither did the recovery mode.
I was shooting for this but it didn't work:
2 physical (well, VMware virtual) disks
1 small RAID1 (md0) for /boot (no crypt, no LVM)
1 RAID1 (md1) + encryption + LVM for /
Notes:
1) I kind of don't care, since I'm not sure I'd use this combination in
practice. I might want to encrypt and use LVM on a laptop, but then
there's only 1 drive so no RAID1. I might want RAID1 and LVM on a
server, but no encryption since you have to be at the console to type in
the passphrase on boot (I know there are other ways to do it, but they
aren't in the installer!). RAID1+LVM is tested and works, and I suspect
Encryption+LVM would be OK too. And this is all starting to make my
head hurt.
2) I was impressed that the Alternate CD rescue mode asked for the
encrypted partition's passphrases. That was one of my concerns with
using this may layers; how do I recover stuff or even just boot from
LiveCDs and mount things to rsync across the wire?
3) This is all in VMware (Workstation 5.5 on CentOS-4+Xfce2 if anyone
cares). CentOS seemed like a good idea at the time, but I'm going to
re-do it with Xubuntu Hardy RSN.
Here is what I did, which did NOT work, for future reference or in case
someone can poke a hole in my "method."
!!! THIS DID NOT WORK !!!
Using Ubuntu Alternate CD
Partition Method: manual
Partition 256M as "physical volume for RAID" on both disks, and flag
bootable
Use the rest of each disk for "physical volume for RAID"
"Configure Software Raid"
Yes, to write changes
"Create MD devices"
RAID1 #0, then follow prompts, use 2, 0, then the "boot" partitions
"Create MD devices"
RAID1 #1, then follow prompts, use 2, 0, then the other partitions
RAID1 #0, set as "ext3", /boot, label "boot"
RAID1 #1, set as "physical volume for encryption"
"Configure encrypted volumes"
Yes, to write changes
Create passphrase
"Encrypted Volume" md1_crypt
Yes, to create an empty partition table
Use the free space in the encrypted volume to create a "physical volume
for LVM"
Configure the LVM
Create volume group, name = hostname
Create logical volume
swap_1 512M
root rest of space - e.g., 2G (to leave some space free for snapshots!)
LVM VG hostname, LV root
Mount as ext3 /root, label = root
LVM VG hostname, LV swap_1
Use as swap area
But then GRUB and LILO both failed to install:
grub-installer: /boot is a lvm volume (/dev/mapper/hostname-root),
cannot install grub
Fell back to LILO
But LILO would not install either (maybe "cannot open /dev/mapper
read-write"?)
Continued without a boot loader...
Yet, on reboot got:
GRUB Loading stage 1.5.
GRUB Loading, please wait...
Error 15
Booting the Alternate CD in to Rescue Mode attempted to mount / and
asked for the password for /dev/sda5, but failed with:
Failed to setup dm-cryp key mapping
Check kernel for support for the ....
Failed to read from key storage
Command failed
: No key available with this passphrase
Continued and it asked for the passphrase for /dev/sdb5, but same
results as above
Continued, then attempted to mount /dev/md1 (encrypted root) with
failed with an "invalid argument"
Attempted to mount /dev/md0 (/boot) which mounted but then failed with
"no usable shell was found..."
!!! THIS DID NOT WORK !!!
Wow, shutting up now... As usual, thanks for the help and hints,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP |:::======| jp{at}jpsdomain{dot}org
My Account, My Opinions |=========| http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|