On Friday 05 September 2008 10:13:12 pm Bob S wrote:
On Friday 05 September 2008 12:29:20 David C. Rankin wrote:
Bob S wrote:
Hello SuSE people,
Should I not be able to run Yast in the rescue system? I logon as root type yast (or yast2) and I get a bash -command not found.
Bob S
Bob,
After having been through something similar with updates that rendered a system unbootable and needing to use the rescue function on the dvd, here is the short version for gaining full access, including yast, to the broken system:
(1) boot from the install DVD
(2) choose "Rescue System", login as "root" (no password needed)
(3) look at "cat /proc/partitions" to determine which partitions need to be mounted under /mnt to create a chroot environment of your full original system. (the default install will require '/' and '/home' to be mounted). You should be able to tell by the relative sizes of the partitions which partition is / and which is /home. You may also need to look at "ls -l /dev/disk/by-id" for disk by-id mappings if you run into any trouble.
(4) "mount" the partitions under /mnt, then "bind" dev/, proc/ and sys/ and chroot /mnt. (your '/' partition will be '/mnt' after you complete all mounts and before you chroot /mnt) **Note: mount the / partition first otherwise the mount point for /home will not exist yet. _Example_ with '/'=/dev/sda6 and '/home'=/dev/sda7:
mount /dev/sda6 /mnt
[** Note: at this point you can check /mnt/etc/fstab for the original devices and mount points used and unmount/adjust if necessary] continuing:
mount /dev/sda7 /mnt/home mount -o bind /dev /mnt/dev mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys cd /mnt chroot /mnt
(5) Now you can run yast and everything else you need to fix your system
(6) After you are done, type "exit" to exit the chroot environment and then "reboot". If all went well, you are done. If not, repeat steps 1-6 above and take another stab at it.
This was all Greek to me until Joe Morris lent a hand to help explain the process of creating the chroot environment. It all works just the way it is supposed to. As always BACKUP what you can't afford to lose.
David,
Thank You for the detailed explanation. It will be very helpful if it will let me do what I want to do. Not sure I understand the chroot environment though. It means that you are creating a "separate" filesystem which allows you to do whatever you want to the "regular" filesystem? even those portions that you have emulated in the chroot environment? Hope I am making myself clear here.
Ex: suppose I wanted to rename a mount point to something else. eg. / to /11.0 ? and then /10.3 to / . Sounds crazy I know but I am desperate to get my 10.3 booting again. I need to have both systems unmounted to do that.
Bob S
The chroot (command and environment) is used too boot in a bootable, ie. rescue system, than switch to system that has a problem. The /mnt of rescue system is used to mount on it partition that has a problem. There is no need to create special mount point, as once you execute chroot /mnt all you can see is your 10.3 system directory tree, every command will be executed from 10.3 directory tree, and every change is done to your 10.3. The only things that belong to rescue are kernel related directories /proc, /sys and /dev. -- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org