You are not logged in.
<< EDIT: The original issue for my post was solved, thanks for your help, but I am looking for advice on the proper way of using chroot to access the whole system for repair purposes (as in installing the standard kernel via pacman in case of breakage), please see posts below. Thanks! >>
Hello,
I have just upgraded the kernel via pacman to current release 2.6.22. But there was an error message because my /boot partition (separate) was not mounted.
So now I realize that /boot was not being mounted, I suspect because my kernel (using -ck version from extra or community) does not support ext2: mount /dev/sda7 /boot -t ext2 returns "unknown filesystem type: 'ext2'"; same thing with similar mount commands.
The problem is I fear that if I restart the machine something bad might happen. I would like to go back to previous kernel, fix the issue of my ext2 boot partition not mounting (maybe by using standard kernel), and only then upgrading to current kernel version, with /boot properly mounted.
Now, what I want to try is recover the standard kernel, previous version. I am doing makepkg from the abs tree, which was synched a few days ago, so it contains the older kernel. The question is: will installing that version now enable me to reboot safely? Please consider I will install it with my boot partition not mounted, because I can't mount it now, because I'm stuck with a kernel without ext2 support.
If not, can you help me by suggesting a safe way to upgrade the kernel?
Thanks!
Last edited by fede (2007-07-26 11:54:43)
Offline
One thing to remember here is that you can always boot the installation CD and use it as a rescue disc. I would just do that, and chroot into your real system. That way you know you're working with a reasonable kernel, and can mount /boot while you're working.
Offline
Err I had same situation once. Pacman just installed /boot stuff to root partition instead of boot partition. I just copied stuff over from root/boot to boot. I guess pacman removes all stuff related to old kernel version? In my gentoo boxes I usually keep two versions of kernel in /boot and I compile them manually and put needed drivers statically.
Offline
Thanks for the replies. I actually got it working by installing the previous version of the kernel from my abs sources. It complained that it couldn 't find boot. Thanks for the tip, ataraxia. I would have done that but I'm not very comfortable with chrooting, I should learn the necessary commands and the correct order (and reasons for that) for mounting /boot, /proc, /sys. Did it once, but I was just taking the plunge, not really knowing why or in what order I had to mount those.
I should look for a good chroot tutorial in my spare time. If you know where I can find one, I 'd be grateful. Thanks.
Offline
1. mount root partition /mnt/root (or whatever)
2. mount other partitions under root partition
3. mount proc, mount -t proc proc /mnt/root/proc
4. mount dev (needed?) mount -o bind /dev /mnt/root/dev
5. cp /etc/resolv.conf to /mnt/root/etc/
6. chroot /mnt/root/ /bin/bash
Correct me if I'm wrong or if I'm missing something. This method can be used also recovering root password, just do passwd after chroot.
Last edited by Obi-Lan (2007-07-26 10:24:31)
Offline
Thanks, obilan,
Searching the wiki and forums I also found these recipes:
# mount /dev/sda1 /mnt
# mount --bind /dev /mnt/dev
# chroot /mnt /bin/bash
( http://bbs.archlinux.org/viewtopic.php?id=34631 )
modprobe xfs
mount -t xfs /dev/discs/discX/partY /mnt
mount -t xfs /dev/discs/discV/partW /mnt/boot (if you have it)
mount -t devfs none /mnt/dev
mount -t proc none /mnt/proc
chroot /mnt /sbin/lilo
( for fixing lilo on xfs, but I can ignore that part ; http://wiki.archlinux.org/index.php/Pos … el_Updates )
mount /dev/sdaX /mnt
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash
( http://bbs.archlinux.org/viewtopic.php?id=31942 )
So the question is why the differences and which is best? Specifically:
Which command is correct for mounting /dev - if necessary, as you suggest -, or do they all work properly?
Is it necessary to mount sys?
thanks a lot!
PS: I edited the thread title.
Offline
Devfs is deprecated I think so mount -t devfs none wont work. mount -o bind or mount --bind seems to do same thing. I've never mounted sysfs but it might be needed for some operations.
Offline