You are not logged in.
Pages: 1
Basically the question is : is it possible to safely and properly upgrade Arch using a chroot from another distro ?
I don't remember details, but some times ago, I was booted under Ubuntu and :
- I mounted my Arch Linux partition at /media/Arch
- I chrooted in /media/Arch
- I ran pacman to upgrade the system
- I got some warnings during a mkinitcpio phase (kernel had been updated)
After this I was unable to boot in Arch. Fortunately it still worked with the fallback kernel, so I was able to repair (running again a mkinitcpio as I was booted into Arch).
Now I would like to try again (upgrading Arch from Ubuntu), but I am afraid of messing my system. Is there a way to do this upgrade with chroot properly ?
Offline
I have several chroots of different ArchLinux installations here. Updates runs all fine here.
Are you mounting other things into the chroot (e.g. /proc, /dev/, /sys)? The system needs these directories...eventually some more things, I don't know without looking to my chroot mount script.
Last edited by ise (2007-10-12 07:37:01)
Offline
No I am a totally newbie concerning chroot, and I only did chroot /media/Arch, entered my password, and ran pacman -Syu. So I guess that I missed some crucial steps (like mounting /proc, etc..). If it is not to personal, can you perhaps post your chroot mount script, so that I can study it and adapt it to my case ? If you know about some documentation that could give me some background on chroot and so on, it would also be great.
Anyway, thanks a lot !
Offline
If it is not to personal, can you perhaps post your chroot mount script, so that I can study it and adapt it to my case ?
No, it isn't too personal... You can have it, but I'm at work right now. I can't post it yet. Maybe another dev or user can post his chroot script. Otherwise I will post it in the evening.
For documentation try google... Don't know a documentation at the moment
Offline
mount --bind /proc /opt/arch32/proc
mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
mount --bind /dev /opt/arch32/dev
mount --bind /dev/pts /opt/arch32/dev/pts
mount --bind /dev/shm /opt/arch32/dev/shm
mount --bind /sys /opt/arch32/sys
change /opt/arch32 in /media/Arch
Arch64_Install_bundled_32bit_system
Last edited by fancris3 (2007-10-12 12:28:37)
Offline
mount --bind /proc /opt/arch32/proc mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb mount --bind /dev /opt/arch32/dev mount --bind /dev/pts /opt/arch32/dev/pts mount --bind /dev/shm /opt/arch32/dev/shm mount --bind /sys /opt/arch32/sys
Why would you bind-mount a directory residing in /proc or /dev when you have /proc and /dev already bind-mounted there??
mount --bind /proc ${chroot}/proc
mount --bind /dev ${chroot}/dev
mount --bind /sys ${chroot}/sys
is sufficient.
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Ok, I will try this next time I'll have to upgrade from Ubuntu. Thanks !
Offline
So, after some further investigations, it appears that
#!/bin/bash
export MNT="/media/Arch"
sudo mount "$MNT"
cat /etc/resolv.conf > ~/resolv.conf.tmp
sudo mv resolv.conf.tmp "$MNT"/etc/resolv.conf
sudo mount -t proc none "$MNT"/proc
sudo mount -o bind /dev "$MNT"/dev
sudo mount -t devpts /dev/pts/ "$MNT"/dev/pts
sudo chroot "$MNT" /bin/bash
sudo umount "$MNT"/dev/pts
sudo umount "$MNT"/dev
sudo umount "$MNT"/proc
sudo umount "$MNT"
works for me . I am not sure about whether mounting /dev/pts is necessary or not, and I have not tried a chrooted kernel upgrade so far.
Offline
Should add /sys in there too
mounting /dev/pts is redundant, as it's aready there.
Last edited by iphitus (2007-10-18 20:58:45)
Offline
OK. Many thanks.
Offline
Pages: 1