Installing Lenny on LVM using debootstrap

2009-05-18 Thread Marc Shapiro
I have given up on trying to get flash working again on my existing 
system.  I have decided, since I have a spare partition with LVM volumes 
for /home, /var, /usr, /tmp, and swap that I would just reformat them 
with mke2fs -j and reinstall using debootstrap into these volumes.  I 
followed the instruction in Appendix D of the installation manual, but 
they seem to have changed since I installed Lenny the first time (and 
Etch, before that) and there is no mention of how to install on LVM volumes.


Here is what I have done:

I reformatted:
/dev/hda1(for /)
/dev/vg0/tmp
/dev/vg0/usr
/dev/vg0/var
/dev/vg0/home

I did:
mkswap /dev/vg0/swap
sync;sync;sync
swapon /dev/vg0/swap

I mounted /dev/hda1 on /mnt/debinst
I chrooted into /mnt/debinst

I made mountpoints for:
/tmp
/var
/usr
/home

I exited the chroot

I mounted:
/dev/vg0/tmp on /mnt/debinst/tmp
/dev/vg0/var on /mnt/debinst/var
/dev/vg0/usr on /mnt/debinst/usr
/dev/vg0/home on /mnt/debinst/home

I used debootstrap --arch ARCH lenny \
/mnt/debinst http://ftp.us.debian.org/debian

to install the base system.

I then chrooted into /mnt/debinst, again, and did:
cd \dev
MAKEDEV generic

The instructions then say to create /etc/fstab and mount your 
partitions.  It tried that, but I can not access the LVM volumes to 
mount them within the chroot.  I seem to have everything that should 
have been installed (150+ screens of files from ls -R /usr), but df says 
that I have only used 9% of 280003 blocks of sysfs mounted on /sys. 
Nothing else is shown.  Can I just install lvm2 from within the chroot? 
 Will that allow me, then, to mount the volumes?  Do I want to mount 
the LVM volumes, since it seems that everything is available.  But then, 
what happens once I have everything ready to reboot into the new 
partitions if I can't mount the volumes then?  I don't remember having 
this problem when I initially installed Lenny, which was also done 
through a debootstrap chroot.


Are there instructions somewhere for doing the install onto LVM volumes?

I REALLY want to get a system with working flash.  So does my daughter!

Help!  Please.

--
Marc Shapiro
mshapiro...@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: Installing Lenny on LVM using debootstrap

2009-05-19 Thread Boyd Stephen Smith Jr.
In <4a125119.8030...@yahoo.com>, Marc Shapiro wrote:
>I then chrooted into /mnt/debinst, again, and did:
>   cd \dev
>   MAKEDEV generic

Instead of this, since you have a running Linux system, I would suggest 
doing (from outside the chroot):
mount -o rbind /dev /mnt/debinst/dev

That wouldn't work if you were trying to install Debian from (e.g.) AIX, HP-
UX, or NCR UNIX, but, in that case, you'd have to reboot into Linux to 
access the Linux LVM2 logical volumes anyway.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/



signature.asc
Description: This is a digitally signed message part.


Re: Installing Lenny on LVM using debootstrap

2009-05-20 Thread Marc Shapiro

Boyd Stephen Smith Jr. wrote:

In <4a125119.8030...@yahoo.com>, Marc Shapiro wrote:

I then chrooted into /mnt/debinst, again, and did:
cd \dev
MAKEDEV generic


Instead of this, since you have a running Linux system, I would suggest 
doing (from outside the chroot):

mount -o rbind /dev /mnt/debinst/dev


Thanks, that did it.  The devices all show up now.  I installed lvm2 in 
the chroot then exited and unmounted them from outside the chroot. 
After reentering, I was able to do a mount -a and everything looks as it 
should.


That is probably what I have done before, but the current docs only say 
that it can be done, not what the actual command is.  They also 
recommend against it.  I suppose that is because the base system is not 
guaranteed to be linux, but still...


--
Marc Shapiro
mshapiro...@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: Installing Lenny on LVM using debootstrap

2009-05-20 Thread Boyd Stephen Smith Jr.
In <4a140dad.6020...@yahoo.com>, Marc Shapiro wrote:
>Boyd Stephen Smith Jr. wrote:
>> In <4a125119.8030...@yahoo.com>, Marc Shapiro wrote:
>>> I then chrooted into /mnt/debinst, again, and did:
>>> cd \dev
>>> MAKEDEV generic
>> Instead of this, since you have a running Linux system, I would suggest
>> doing (from outside the chroot):
>> mount -o rbind /dev /mnt/debinst/dev
>That is probably what I have done before, but the current docs only say
>that it can be done, not what the actual command is.  They also
>recommend against it.

That's probably because the bind mount gives the chroot significant access 
to the host.  Specifically, unlinking a device from /dev inside the chroot 
will also unlink it from /dev outside the chroot, which could cause 
problems.

I don't mind doing the mind mount, because much more destructive acts can be 
done as root inside the chroot if you don't have the filesystem it is on 
mounted 'nodev' and doing that generally results in a non-functional chroot.  
As far as destructive acts, I'm thinking mknod for every possible hd*, sd*, 
md*, and dm* device plus urandom and then writing the contents of urandom 
over all the other devices.

chroots are only as secure as your method of dropping permissions after 
doing the chroot() system interface call.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/



signature.asc
Description: This is a digitally signed message part.