[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: switch from 2.4.24 lvm1 to 2.6.10 lvm 2 problems



On Thu, Feb 03, 2005 at 11:00:20PM +0100, Benedict Verheyen wrote:
> Went home with a compiled 2.6.10 kernel and an initrd.
> Installed and booting: black screen
> I forgot frame buffer support and on my grub line there's a vga=791 so
> removed that and it boots ok.
> Before it fails, i get this:
> 
> set umask to 0077
>  Creating directory "/etc/lvm/archive"
>  Creating directory "/etc/lvm/backup"
>  Creating directory "/var/lock/lvm"
>  Using volume group "main"
> 1 PV(s) found for VG main: expected 0
> Unable to find volume group main
> pivot_root: No such file or directory
> /sbin/init: 431: Cannot open /dev/console: No such file
> Kernel panic - not syncing: Attempted to kill init!
> 
> Same error. It seems as if the mkinitrd scripts is not really meant to
> handle lvm :(

Just checking: this LVM group still boots OK on other kernels?

> I noticed in the bootsequence when it detected hda
> /dev/ide/host0/bus0/target0/lun0/: p1 [EZD]
> 
> Also, when booting i went to a shell (thanks to delay=5)
> Got an error: sh: can't access tty; job control turned off but
> i got a shell anyway?

Yeah, I get that. /dev/console seems to be there; I don't know why it
does it, but since it doesn't seem to stop anything working I grew to
ignore it.

> Did an lsmod and the dm_mod was loaded.
> 
> #vgscan
>  Logging ...
>  set umask to 0077
>  Creating directory "/etc/lvm/archive"
>  /etc/lvm/archive: mkdir faild: Read-only filesystem
> 
> I then checked /dev/ and find "main" to be linking to ../devfs/main
> and mapper to ../devfs/mapper.
> 
> I'm totally clueless now. I think the kernel is ok, lvm part and tools
> are ok, just something in the initrd is wrong.

The LVM tools need a writable /etc or nothing works. When you get that
error, / is still the initrd, which is a read-only filesystem because
it's cramfs. You can either do some jiggery-pokery to make an initrd
of a different fs type which can be mounted writable, or you can do
some different jiggery-pokery to provide a writable /etc. I chose to
provide a writable /etc; see the bit after the comment '# Make a
writable /etc for lvmtab' in the lvm-init script on my site.

Now, I was doing a bit of aimless poking about and I discovered that
in /lib/lvm-10 there is a script called lvmcreate_initrd, with its own
man page an' all, whose purpose in life is to create initrds for root
on LVM. It might be that this would save a lot of trouble. I haven't
tried it, though, because the machine I was setting up the LVM root on
is a server which is now live (from my point of view).

> If people on Woody are going to have the same problems when they do
> a dist-upgrade, this is going to be a lot of fun :(

Perhaps that script will perform the requisite magic?

-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F

Attachment: signature.asc
Description: Digital signature


Reply to: