Trisquel 6: updates break GRUB

31 respostas [Última entrada]
sec
sec
Desconectado
Joined: 10/14/2012

After installing updates to trisquel 6, GRUB will no longer load Trisquel 6.

"Previous Linux versions" (i.e. previous kernels) still show up as options, but when selected, an error appears citing the "--unrestricted" parameter.

I have this exact same problem on 2 different machines, so should be easy to replicate. (but I can provide extra info on request, of course)

I am triple-booting trisquel6, trisquel7 and windows. GRUB still loads T7 and Windows ok. It's just T6 that won't load.

marioxcc
Desconectado
Joined: 08/13/2014

Report it as a bug. See the item “issues” at the navigation bar that appears to the right and include all relevant information (Exact error message, and attach the file “/boot/grub/grub.cfg”.

Alij
Desconectado
Joined: 05/08/2012

Te same for me here. After instaling updates give me the error:

"Unknow argument --unrestricted"

quidam

I am a member!

I am a translator!

Desconectado
Joined: 12/22/2004

Fixed in version 1.99-21ubuntu3.17+6.0.1trisquel5

Alij
Desconectado
Joined: 05/08/2012

Quidam it's show me this:

GNU GRUB VERSIÓN 1.99-2UBUNTU3.17+6.0.1TRISQUEL4

PREVIOUS LINUX VERSIONS

And i can't do anyting, how i can upgrade or i should reinstall?

sec
sec
Desconectado
Joined: 10/14/2012

Same problem here. I can't get into T6 to do the update. Already tried Boot Repair, to no effect.

quidam

I am a member!

I am a translator!

Desconectado
Joined: 12/22/2004

With a live cd, mount your / partition and edit ./boot/grub/grub.cfg to remove the '--unrestricted' parameters. Then you should be able to reboot and update grub. Excuse the inconvenience.

ssdclickofdeath
Desconectado
Joined: 05/19/2013

This fix is overwritten when grub's settings are changed. I removed all instances of --unrestricted as you suggested, though without a live CD. When I restarted my computer, the correct kernel version showed up and booted properly. I later decided to change the grub splash image by modifying the /etc/default/grub file. After running update-grub and restarting, the same problem occurred.

The top of the file you suggested to modify does state that it shouldn't be changed.
/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

Are you aware of a more permanent solution?

ssdclickofdeath
Desconectado
Joined: 05/19/2013

I forgot to run a software upgrade after booting, that's why it didn't work. I feel so stupid. :P

quidam

I am a member!

I am a translator!

Desconectado
Joined: 12/22/2004

Also you should be able to do it from grub itself, with the edit option, as long as you know the grub password. If you don't you can read it with a similar procedure, using a live cd mount / and read ./boot/grub/grub.cfg (but if you are already doing that you could as well remove the '--unrestricted' parameters).

Alij
Desconectado
Joined: 05/08/2012

No idea how to do that, my livecd doesn't load.

sec
sec
Desconectado
Joined: 10/14/2012

Works for me. (perhaps your CD is corrupted)

Once my LiveCD loaded, I used these commands:

sudo mount /dev/sda5 /mnt [my / partition is on sda5, yours may differ]

gksudo gedit /mnt/boot/grub/grub.cfg

and i use find and replace to delete all the instaces of "--unrestricted".

happy new year

Alij
Desconectado
Joined: 05/08/2012

Hi sec, i don't have partitions trisquel is my main os, i'll try to get another trisquel cd and try out.

lembas
Desconectado
Joined: 05/13/2010

During the recent grub updates on Trisquel 6 the installer asked if I wanted to change some config file as my differed from what was in the package and I asked to see the diff, however that was never shown. The next time I rebooted I was shown the grub menu unlike before.

Sim
Sim
Desconectado
Joined: 09/29/2013

Since the last update of my Trisquel 6 distribution, I get the following error message at the beginning of the booting process (quite after I select the linux version in the grub menu):

error: symbol not found: 'grub_efi_secure_boot'.

I couldn't find any '--unrestricted' parameter in grub.cfg

What can I do to fix this problem? I didn't expect that something like this could happen due to a 'normal' update.

Sim
Sim
Desconectado
Joined: 09/29/2013

I fixed my problem by using chroot from a live CD and making an upgrade of my system followed by "update-grub".

Potato
Desconectado
Joined: 06/04/2014

I would appreciate it if we could get an "official" set of detailed instructions for fixing this problem. Instructions that someone with only a very limited amount of technical experience with text commands could understand and follow. and, the sooner, the better. Thanks.

Using a Trisquel 6 Live Cd, I tried "sec's" three text commands with sda1. I got "Can't find" and "does not exist". For sda, I got a wierd hangup while loading a file inside gedit that I ended by ending gedit. I also tried "Sim's" chroot "tip", and got no results.

I have a ThinkPenguin Pro with only Trisquel 6 pre-installed.
(I had substantial expertise with DOS commands many years ago.)

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Where exactly are you stuck? Here are various ways to fix Trisquel from a live system: https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System

I would personally go the 'chroot' way because it is what I have always done (and it reminds me of my installation of Gentoo some 12 years ago): https://help.ubuntu.com/community/Grub2/Installing#via_ChRoot

One you get a terminal in the installed system, do what quidam wrote: https://trisquel.info/fr/forum/trisquel-6-updates-break-grub#comment-61807

Notice that 'update-grub' is a command!

Potato
Desconectado
Joined: 06/04/2014

Hello Magic Banana. I appreciate your assistance.
First I altered the BIOS to boot first from the CD/DVD drive. (I made the default first boot media the 2nd boot media.)
Here is what I tried tonight, from a terminal window in Trisquel 6 live cd ("try trisquel" option):

trisquel@trisquel:~$ sudo chroot
chroot: missing operand
Try `chroot --help' for more information.

trisquel@trisquel:~$ sudo mount /dev/sda1 /mnt
trisquel@trisquel:~$ sudo gedit ./boot/grub/grub.cfg
This opened up a grub file that was empty, so I closed the Gedit window.

(gedit:4279): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.400LRX': No such file or directory

(gedit:4279): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:4279): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.EYZZRX': No such file or directory

(gedit:4279): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
trisquel@trisquel:~$

trisquel@trisquel:~$ sudo chroot /dev/sda1
chroot: cannot change root directory to /dev/sda1: Not a directory
At this point I quit.

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Is sda1 really the root partition of the installed system (i.e., the partition mounted at /)? If yes, then that command was OK:
$ sudo mount /dev/sda1 /mnt

You can then execute the following command to mount the virtual filesystems (although I am not sure it is that essential):
$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Then, you can 'chroot' into the mounted root partition by specifying in argument the directory where it was mounted (not the device as you did):
$ sudo chroot /mnt

Now you can "remove the '--unrestricted' parameters" from /boot/grub/grub.cfg (as quidam told):
$ sed -i 's/--unrestricted//g' /boot/grub/grub.cfg

You could do that with a normal text editor (you seem to like GEdit) as well... but 'sed' is more geeky! :-)

Finally:
$ update-grub

Potato
Desconectado
Joined: 06/04/2014

Thanks Magic Banana. I entered all five of the commands you listed above. They all seemed to execute OK.
What command(s) do I enter in order to get back to my live CD, and then reboot my PC (to see if it is actually fixed? Thanks.
I think I will close down the terminal window, click shutdown, and see what happens.

I closed the terminal window, and shut down. I turned the computer back on (without the live CD). What I tried had no effect, the boot grub problem remains.

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

To exit the 'chroot' you can use the 'exit' command. I guess Ctrl+D would work as well. Anyway, as long as you waited for the return of the prompt after firing 'update-grub', you could as well abruptly reboot like you did.

Since it did not work, could you check that the occurrences of "--unrestricted" were really erased from /boot/grub/grub.cfg?

Potato
Desconectado
Joined: 06/04/2014

I tried it again today. The file displayed upon executing the sed command. I did not see any occurences of the string '--unrestricted'.
This time, I did not execute the command "update-grub". Instead, I tried to execute the command "umount /dev/sda1". Bash rejected this command, but I did not make a note of the reason why.
I did a Ctrl-D, and then rebooted without the live-cd. No change in the boot-up.

ssdclickofdeath
Desconectado
Joined: 05/19/2013

I was able to get it working by removing the "--unrestricted" parameter from the kernel on the top of the grub edit boot screen (press E to access it,) then booting from that kernel.

(Added as an edit: Once you have booted,)

Run sudo apt-get update; sudo apt-get upgrade
then run update-grub. That worked for me.

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Booting "by hand" and letting APT do the job is another way to go. This time I am not even sure you need to execute 'sudo update-grub': 'apt-get' has probably executed it for you (command called from a post-processing script). Anyway, it does not hurt.

Potato
Desconectado
Joined: 06/04/2014

Thanks ssdclickofdeath. When I entered the "e" option, it asked for a username and password. I entered my Trisquel name and password, to no effect. I guess grub has its own username and password.
Regarding your comment about the kernel, I guess you mean a certain part of the grub config file.

lembas
Desconectado
Joined: 05/13/2010

You can find the GRUB username/password for your install in /etc/grub.d/01_PASSWORD

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

And this password is an annoyance for most users; useful for close to nobody. We have one more example here. For reference, here is the last time I discussed that annoyance in this one-week-old message: https://trisquel.info/en/forum/new-user-root-password-problems#comment-61998

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

The file displayed upon executing the sed command.

My bad. I forgot to write the option "-i" that allows to actually edit the file (rather than showing the result on the standard output and letting the file untouched):
$ sudo sed -i 's/--unrestricted//g' /boot/grub/grub.cfg

Sorry about that. I am correcting my original instructions right now.

You really need to fire 'sudo update-grub' after altering GRUB's configuration.

Potato
Desconectado
Joined: 06/04/2014

Thanks Magic Banana. I guess that I should prefix 'every' command with sudo. I do not know what: "Booting "by hand" and letting APT do the job" means. I also noticed that you altered your original instructions above. As I mentioned, when I got the file to display with sed, I did not notice any occurences of "--unrestricted". I will carefully read your new messages, and your altered old directions. I will hopefully try one or more of these ideas about 8 hours from now. Thanks.

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

With the "-i" option, the 'sed' command really modifies the file at input. Without it, it takes the content of the file as its input and write its output to the terminal. The input file is left unmodified.

In the context above I meant "editing the kernel line in GRUB and booting it" (like ssdclickofdeath explained) when I wrote "booting by hand".

Potato
Desconectado
Joined: 06/04/2014

Success!
I used the comments of Magic Banana, ssdclickofdeath, and lembas. (I followed the procedure of ssdclickofdeath, because I thought that I understood it.)
I greatly appreciate the assistance that all of you provided to me.