1

Topic: GRUB boot problem in FAQ

I hope someone is willing to explain a problem I have trying to follow the procedure in the FAQ under "Fixing GRUB boot problem".

I seem to be successful up to the point where it says to enter the command:
root@sysrescuecd / % chroot /tmp/mydir
when the following message is displayed:
chroot: failed to run command `/bin/zsh': no such file or directory

I apologize in advance for any errors retyping the above text and for my difficulties trying to become proficient with Linux.  I have tried the obvious things I can think of such as sudo and running the command from various directories.

It seems like there should be an easier way to do this, a link for more details under this heading in the FAQ, or a better forum for this type of question. 

Thanks very much for your help and advice,
Lloyd

2

Re: GRUB boot problem in FAQ

Use this instead:
   

chroot /tmp/mydir /bin/bash

By the way just using "chroot /tmp/mydir" does work when using the GParted LiveCD.

Explanation:
Chroot by default runs the current shell (value reported by "echo $SHELL") when only passed a directory and no command to run.  Therefore I think you are using another rescue CD which uses zsh rather than bash, and that your on Linux installation you are repairing doesn't have /bin/zsh installed.  Hence your error message.

Mike

3 (edited by LloydEwing 2017-01-02 17:00:28)

Re: GRUB boot problem in FAQ

Mike,
Thanks for your help.  I am using an older System Rescue CD (SysRescueCD.org).  zsh is the default on this disk so it seems like it should have worked, but when I specified bash I was able to complete the procedure without errors. 

I think the procedure in the Gparted manual needs to be clarified.  It  does not say that you need to use the the GParted LiveCD.  It says "Boot from Live media such as GParted Live or your GNU/Linux distribution image."

Unfortunately it looks like the chroot error was just the beginning of my problems.  After completing the procedure and receiving the message "Installation finished.  No error reported." the computer still does not boot properly. 

When I boot the system, instead of the Grub menu that gave me a choice of my two Linux installations, it goes directly to the first one.  On the splash screen for Ubuntu this message is displayed: 
"The disk drive for /data1 is not ready yet or not present.
Continue to wait, press S to skip or M for manual recovery."
Pressing s or m causes this message to be displayed:
"The system is running in low-graphics mode"
then get the command prompt.

I have an NTFS partition called data1 on sda9 that does not contain anything that is necessary to the operating system.  I created the partition for sharing data between installed systems because I thought I might want to install Windows on one of the partitions.

Is there anything else I can do to repair this system, or will I have to reinstall everything?  Should I try using  GParted Live to make the repair?  The Lubuntu installation is much more important to me.  Should I repeat the FAQ "Fixing GRUB boot problem" procedure using that partition?


I don't think it matters, but just in case, these are the partitions on this system:
sda1 - home directory for Ubuntu installation
sda2 - Extended partition
sda5 - Ubuntu installation
sda6 - Swap
sda7 - Lubuntu installation
sda8 - home directory for Lubuntu installation
sda9 - data1 NTFS
(When I initially partitioned the disk I thought there might be some advantage to having the home directories in a separate partitions.)

Many thanks very much for your help!

4

Re: GRUB boot problem in FAQ

What happened to break your system?  Knowing that might help in it's recovery.

Assuming nothing catastrophic happened to your data it is still all there on your hard drive.  It is just a question of how to get to it and how long will it take before it is not worth the effort.

1. I strongly recommend you make a backup of data that you care about before doing anything else.  For you I suggest you use GParted (from the latest GParted Live CD or the latest System Rescue CD) and copy the partitions you care about to a spare hard drive.  From what you say that would be sda8 (Lubuntu home), sda9 (data1) and may be sda1 (Ubuntu home).  However given the above message about "/data1 is not ready yet or not present" sda9 may not exist because of partition table entry corruption of file system overwriting.

2. I haven't tried this myself but it looks easy and should do what you need (which it to update GRUB2 configuration with both *Ubuntu installations and reinstall GRUB2).
How to Repair GRUB2 When Ubuntu Won’t Boot

If you need further technical help please include output of the following commands:

fdisk -lu /dev/sda
parted /dev/sda print

Mike

5

Re: GRUB boot problem in FAQ

Mike, Thanks very much for your advice!  Using the boot repair tool you recommended I was able to get my system to boot, but the problems with the Gparted manual and the FAQ remain.  I don't think it would be in the best interest of the Linux community to mark this problem as solved until the problems with the GParted manual are addressed. 

I see that there is a way to report documentation problems for GParted with Bugzilla, so I can try posting a link to this thread as a new bug.

My computer has other problems now, but at least the Lubuntu partition seems to boot properly so the remaining problems will be topics for another forum. 

Here are some details of the additional things I did that resulted in a system that boots properly:

First I burned a copy of the 2017 version of System Rescue CD to see if I would have any more success with it than the old version I had been using.  I got the same results.  The chroot syntax described in the GParted manual displays the same error message.  Specifying bash eliminates the error message, but chroot will not accept zsh, even though both shell files are in the same directory.

Then I went to the link in the previous post and followed those instructions, burning a copy of the Boot-Repair-Disk.  I left most of the menus in Boot-Repair-Disk at their default, although I specified my Lubuntu partition for the boot flag.  After that the system would boot successfully, but the Grub boot menu that was displayed had about a dozen choices and none of the descriptions made any sense (except for Memtest).  The Lubuntu partition seemed to work properly.

My next step was to run the update from Lubuntu 14.04 to 16.04.  That fixed the Grub boot menu so the choices make sense now.  There were some errors while trying to make the update, but after several iterations it tells me everything is up to date.  The only major problem I see now is that the system hangs when I try to shut it down.

What happened to break your system?  Knowing that might help in it's recovery.

The Lubuntu installation on this computer worked without major problems before I used GParted.  Grub was set up to display a menu for choosing which partition to boot.  I wanted to update Lubuntu from version 14.04 to 16.04, but the update failed because there was not enough free space in the partition to download all of the update files.  It seemed like the easiest way to solve the problem would be with GParted.  There was some unallocated space on the drive but it was not adjacent to the Lubuntu partition.

It had been so long since I used the other bootable partition on this disk that I don't remember if it worked.  After using Boot-Repair-Disk it does not boot.  I get the message "The disk drive for /data1 is not ready yet or not present..." .  Apparently it was this partition that produced the error message I saw after I followed the instructions in the GParted manual.  There was no Grub boot menu at that point.  (I am not concerned about trying to fix the installation on this partition.)

Many thanks,
Lloyd