You are not logged in.

#1 2012-04-14 09:15:29

louis058
Member
Registered: 2010-11-12
Posts: 31

[SOLVED] chroot to LVM filesystem with Arch Installer CD

Just a while ago, I was trying to disable KMS on my computer, as when I booted, for some reason the computer wouldn't connect to the monitor and display a picture until udev started loading modules.
I started by adding the line radeon.modeset=0 to menu.lst's kernel option line, but this only made the problem worse as the computer would then never connect to the monitor.
I couldn't blindly fix this as it would involve guessing when the login prompt was up, typing in my password, opening the editor, and finding the line in menu.lst to edit it.

So I booted up the Arch Install CD, and thought I would try the Change Root method detailed in the wiki, but realised that I didn't know how to mount the LVM filesystem, because root was contained there.

The volume group I had was absent from /dev/mapper and /dev, and the only reference I seemed to be able to find was /dev/sda2, which was listed as 'Linux LVM' under fdisk -l. I tried loading the dm-mod module with modprobe then mounting sda2, but it didn't work.
Fortunately, I had my /boot partition on a separate partition (i.e. sda1) as recommended by the wiki, so I could mount it and fix the problem anyway.

However, I need to fix this problem with KMS somehow in the future, which may require editing files outside of /boot and it may need me to know how to mount the LVM filesystem and chroot to it, so how do I do that with the Arch Installer?

Last edited by louis058 (2012-04-14 10:24:13)

Offline

#2 2012-04-14 09:25:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] chroot to LVM filesystem with Arch Installer CD

vgchange --available y $volgroupname
man vgchange wrote:

       -a, --available [e|l]{y|n}
Controls the availability of the logical volumes in the volume group for input/output.  In other words, 
makes  the  logical  volumes known/unknown to the kernel.

Last edited by jasonwryan (2012-04-14 09:25:47)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-04-14 09:28:10

louis058
Member
Registered: 2010-11-12
Posts: 31

Re: [SOLVED] chroot to LVM filesystem with Arch Installer CD

jasonwryan wrote:
vgchange --available y $volgroupname
man vgchange wrote:

       -a, --available [e|l]{y|n}
Controls the availability of the logical volumes in the volume group for input/output.  In other words, 
makes  the  logical  volumes known/unknown to the kernel.

Wow, thank you. I did look at 'man lvm', but I guess I wasn't looking hard enough. I'll go test it out right away.

Offline

#4 2012-04-14 10:05:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] chroot to LVM filesystem with Arch Installer CD

One more thing - you don't need to chroot. Just mount the filesystem, and edit as required.

Offline

#5 2012-04-14 10:23:55

louis058
Member
Registered: 2010-11-12
Posts: 31

Re: [SOLVED] chroot to LVM filesystem with Arch Installer CD

tomk wrote:

One more thing - you don't need to chroot. Just mount the filesystem, and edit as required.

I didn't think of that at all, thank you!

Also, just tested jasonwryan's method, worked perfectly!

Offline

Board footer

Powered by FluxBB