GRUB issues

23 replies [Last post]
SamWS
Offline
Joined: 04/28/2015

Hello,

I'm new to Trisquel, but not to GNU/Linux (I have basically some experiance with Ubuntu desktop, and a debian servers) :)

So I just installed trisquel on my laptop where I have my Ubuntu 12.04 installed, and surprisingly, I find isseus accessing ubuntu. It asks me for my username and password, when I do enter it, it sends me back to GRUB menu.
I tried boot-repair but it didn't work.
Anyone can help me with that?

Oh and, is there some kind of LTS and non-LTS versions of Trisquel?

Thank you!

lembas
Offline
Joined: 05/13/2010

Hello and welcome!

You need the GRUB credentials. They're randomized at install and can be found in /etc/grub.d/01_PASSWORD. You can comment them out to get rid of them. Remember to update-grub afterwards if you do.

There is only one version of Trisquel in that sense. (It's based on a ubuntu LTS. There are some backports from newer non-LTS versions, like kernels and xserver.)

SamWS
Offline
Joined: 04/28/2015

Ok I see ! Thank you very much for your answer !

Samy Melaine
Offline
Joined: 04/28/2015

Ok I see ! Thank you very much for your answer.

2015-04-28 7:48 GMT+01:00 <name at domain>:

> You need the grub credentials. They're randomized at install and can be
> found at /etc/grub.d/01_PASSWORD
>
> There is only one version of Trisquel in that sense. (It's based a ubuntu
> LTS. There are some backports from newer non-LTS versions, like kernels and
> xserver.)
>

strypey
Offline
Joined: 05/14/2015

Can you please link to a set of newbie-friendly instructions for updating GRUB that will work reliably in Trisquel 7?

Speaking of GRUB, I find that I need to run boot-repair every time I install Trisquel. Is there a reason why it isn't in the Trisquel repos, or even installed by default?

moxalt
Offline
Joined: 06/19/2015

What exactly are you trying to do with GRUB?

strypey
Offline
Joined: 05/14/2015

I've been using Trisquel 6 for a couple of years, and I just installed Trisquel 7 on a separate partition to try it out before deciding whether to upgrade, migrate, or stay on 6. When I rebooted after running through the install, the new GRUB menu wouldn't boot Trisquel 6. When I selected it, it asked me for a username and password, so I gave it the credentials for that install, then it just dumped me back in the GRUB menu. Strangely, when I selected Windows from the new GRUB menu, it took me to my old GRUB menu, and I was able to book Trisquel 6 from there.

I ran boot-repair (paste2.org/5yvtsf6N), and when it finished it told me I needed to repair the boot sector of sda2 (my legacy Windows XP partition), which I did using TestDisk. After that I was able to boot into Windows XP from the new GRUB menu, but still unable to boot into Trisquel 6 from it, and now unable to get into the old GRUB menu either. I ran boot-repair again (Paste2.orgDI4gJ7jI), but no effect.

Using the information above, I made a copy of the GRUB password file, and deleted the file, but this didn't seem to make any difference. Any suggestions? I really would like to get back into Trisquel 6, as it's been set up just how I want it, and I'd prefer to have a chance to play around with 7 a bit before I migrate. Any suggestions?

strypey
Offline
Joined: 05/14/2015

After I posted that info, I had a hunch. I had saved the copy of the password file in the same grub.d folder, with "-backup" appended to the end of the filename. This time, I copied it to a different folder, with "backup-" at the start of the filename, and deleted the first backup. Then I updated GRUB (sudo update-GRUB2) and rebooted. Voila! Typing this from Trisquel 6, and happy to be back in my familiar interface.

Trisquel 7 provides some definite advantages, like more current versions of application software, but I've already struck a few weird bugs, like flickering of applications frames, cursor, and keyboard input. Also there are subtle rearrangements of the interface (eg the Settings applets) which make it hard to find things. For example, in 6 I have Compiz by default, and I can choose between that and Metacity, whereas in 7 Metacity is default, and I can't find the tool for changing to Compiz (if it exists in 7).

BTW for anyone curious, I'm using an Acer Aspire One, which I've had for about 5 years.

onpon4
Offline
Joined: 05/30/2012

The tool you're talking about was from the Trisquel devs, and it was dropped in Trisquel 7. You now need to enable Compiz by yourself. The script is pretty simple, though, so you could copy it from Trisquel 6 to Trisquel 7, or 8 (whatever you upgrade to next), or just read it to understand how to enable Compiz manually.

strypey
Offline
Joined: 05/14/2015

This has gotten off topic (GRUB), so I'll reply in the general 7 feedback thread I started:
https://trisquel.info/en/forum/trisquel-7-feedback-hardware-details

cooloutac
Offline
Joined: 06/27/2015

This happens to me with trisquel 7. It doesn't accept any username and password and sends me back to main grub mneu. Just remove the 01_PASSWORD file.

see /etc/grub.d/01_PASSWORD

strypey
Offline
Joined: 05/14/2015

I just tried to follow my own instructions, after reinstalling Trisquel 7 from scratch (I borked my last instance by installing too many games at once ;). Anyone following along should not the correct command for updating GRUB2 is:
sudo upgrade-grub2

NO CAPITALS!?! :)

moxalt
Offline
Joined: 06/19/2015

What does upgrade-grub do then?

moxalt
Offline
Joined: 06/19/2015

*update-grub, rather.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

'update-grub2' is a symbolic link to 'update-grub':
$ ls -l /usr/sbin/update-grub2
lrwxrwxrwx 1 root root 11 juil. 8 08:09 /usr/sbin/update-grub2 -> update-grub

Calling one command or the other leads to executing the exact same program. No difference whatsoever.

moxalt
Offline
Joined: 06/19/2015

Then why strypey's insistence that update-grub2 was the 'proper' way to go
about it?

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Probably because he wrongly believed there was a difference and did not investigate.

strypey
Offline
Joined: 05/14/2015

Actually I am reporting my experience. I ran:

sudo update-GRUB2

Which did not work. Which is why I said "NO CAPITALS". The correct command is:

sudo update-grub2

OR as pointed out by Moxalt and Magic Banana:

sudo update-grub

My apologies for once again confusing GNUbies (as well as myself ;) with the erroneous reference to "upgrade-grub2".

EDIT: Why does the Trisquel install add this GRUB password at all? It adds no security benefit that I can see, and I can imagine it being *very* distressing to GNUbies dual-booting GNU for the first time.

BTW Why can I edit some of my comments (like this one) but not not others (like the ones above)? Is it a browser issue?

lembas
Offline
Joined: 05/13/2010

> BTW Why can I edit some of my comments (like this one) but not not others (like the ones above)? Is it a browser issue?

I believe you can't edit the first post of a thread and posts that have been answered. Or something like that, it's a feature of the forum software.

strypey
Offline
Joined: 05/14/2015

So I've reinstalled Belenos again (same hardware). Trying to follow my own instructions here. Both "sudo update-grub" and "sudo update-grub2" return the same response "command not found". I'm mystified, and feeling more than a little frustrated. Any suggestions?

moxalt
Offline
Joined: 06/19/2015

Does Trisquel boot correctly, from the hard drive you installed it on? Did you
have to chroot into it and grub-install to get it to work? Did you install off
a USB (in my experience that always messes things up- every USB install has me
chrooting in with a live CD and setting up GRUB manually).

Few extra bits of information- can you describe your bootup process to us? Can
you show us the contents of /etc/default/grub and /boot/grub/grub.cfg?

Your situation is indeed mystifying.

lembas
Offline
Joined: 05/13/2010

Do you have the sudo package installed? How bout the grub2-common package?

strypey
Offline
Joined: 05/14/2015

I tried running boot-repair, which has always worked for me in the past with my Aspire One. This time, it was a mistake. When I boot up the laptop, I am presented with a GRUB shell. I looked for instructions on how to use this shell to repair my system, and tried a few commands, but no luck.

I managed to recreate my Belenos LiveUSB, using another laptop running a fresh install of Toutatis from LiveCD, so now I've booted the Aspire One using that. I'm going to try the instructions here and see what happens:
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

EDIT: Everything seemed to go ok, although I had to carefully check what the liveUSB was calling the hard drive (in this case /dev/sdb). But when I ran update-grub, I got the following output:

Script `/boot/grub/grub.cfg.new' contains no commands and will do nothing
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done

When I shut down, removed the liveUSB, and rebooted, I still got the GRUB shell. Any suggestions?

EDIT: I followed the instructions here, chrooting in, purging GRUB, and completely reinstalling it. Success!
http://ubuntuforums.org/showthread.php?t=1581099

moxalt
Offline
Joined: 06/19/2015

It really shouldn't be that hard. If you have problems with GRUB (such as it
not booting correctly/not installing correctly/incorrect boot options) simply
get a live CD (any distribution will do) and boot from that.

Then open a shell and mount the drive in question like so (usually /dev/sda):

# mkdir /mnt/whatever
# mount /dev/sda1 /mnt/whatever
# cd /mnt/whatever
# mount --rbind /dev dev/
# chroot /mnt/whatever
# grub-install /dev/sda
# update-grub

And that should provide you with a working GRUB. But be sure to grub-install
and grub-update once successfully booting into the system, as there could be
SELinux errors. Good luck.