LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edited grub - cant boot LL
#11
Sorry gold_finger i wasnt clearer in describing my situation. Right now the computer boots straight to windows and thats what i wanted but si would also like to show grub menu or boot into LL when i want, how can i achieve that considering the changes i made to grub?

Here is the output from the terminal:

Code:
linux@linux:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0   500M  0 part
├─sda2   8:2    0 172.8G  0 part
├─sda3   8:3    0   999M  0 part
├─sda4   8:4    0     1K  0 part
├─sda5   8:5    0  52.7G  0 part
└─sda6   8:6    0   5.9G  0 part [SWAP]
sdb      8:16   1   7.3G  0 disk /cdrom
└─sdb1   8:17   1   955M  0 part
sr0     11:0    1  1024M  0 rom 
loop0    7:0    0 909.8M  1 loop /rofs
linux@linux:~$ sudo parted -l
Model: ATA WDC WD2500AAKX-6 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size    Type      File system     Flags
1      1049kB  525MB  524MB   primary   ntfs            boot
2      525MB   186GB  186GB   primary   ntfs
4      186GB   249GB  62.9GB  extended
5      186GB   243GB  56.6GB  logical   ext4
6      243GB   249GB  6324MB  logical   linux-swap(v1)
3      249GB   250GB  1048MB  primary   ntfs            diag


Error: Invalid partition table - recursive partition on /dev/sdb.
Ignore/Cancel? 
Reply
#12
So you changed grub file and did get it to boot straight to Windows, but can't get grub menu to show so you can boot LL?  Didn't realize that's where you were at.

First, try to get the grub menu to show by using the LEFT <SHIFT> key (not the right shift key).  Turn computer on, wait 1-2 seconds, then hold down the left shift key.  Don't tap it, hold it down.  If that doesn't work and you still boot straight to Windows, restart with live LL dvd/usb again.

Once up into live LL dvd/usb, open a terminal and do the following to mount your root partition, display the contents of the grub file, then unmount the root partition.
Code:
sudo mount /dev/sda5 /mnt
cat /mnt/etc/default/grub
sudo umount /dev/sda5

Copy/Paste the terminal output back here for us to see and we'll go from there.  Will want to see exact changes you made to that grub file before offering fix suggestion.
Try Linux Beginner Search Engine for answers to Linux questions.
Reply
#13
I will play with the shift key to see if i find the right timing but in the meantime here is the output

Code:
linux@linux:~$ sudo mount /dev/sda5 /mnt
linux@linux:~$ cat /mnt/etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT='Windows 10 (loader) (on /dev/sda1)'
#GRUB_HIDDEN_TIMEOUT=0.0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0.0
GRUB_DISTRIBUTOR=`lsb_release -d 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Linux Lite Grub background
GRUB_BACKGROUND="/boot/grub_linux_lite.png"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
linux@linux:~$ sudo umount /dev/sda5
linux@linux:~$
Reply
#14
I believe you only need to make one small change to make the grub menu appear on boot.  Try the following using a terminal once booted into live LL.

Mount the installed root partition to the live environment.
Code:
sudo mount /dev/sda5 /mnt

Now we'll chroot into your installed system, make change to the grub file, then update grub.

Do the following to chroot into the system.
Code:
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt

This command will open the grub file with the text editor.  (No sudo at beginning of command because your are already operating as root at this moment.)  If you see various error messages pop-up in the terminal, just ignore them.
Code:
leafpad /etc/default/grub

In the opened file, just change the following line to what I have in RED.
GRUB_TIMEOUT=5

Save the file and close the text editor.

Back in terminal do:
Code:
sudo update-grub

Now exit from chroot environment and unmount everything.  (Each line below is a separate command -- do one at a time.)
Code:
exit
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt

Close terminal, shutdown/reboot without the LL dvd/usb and hopefully you now see the grub menu -- should display with a 5 second countdown before it boots the default Windows entry.
Try Linux Beginner Search Engine for answers to Linux questions.
Reply
#15
It doesn't open grub file for some reason.

Code:
linux@linux:~$ sudo mount /dev/sda5 /mnt
mount: /dev/sda5 is already mounted or /mnt busy
       /dev/sda5 is already mounted on /mnt
linux@linux:~$ for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
linux@linux:~$ sudo chroot /mnt
root@linux:/# leafpad /etc/default/grub
No protocol specified
leafpad: Cannot open display:
root@linux:/#
Reply
#16
Ok -- I wasn't sure whether leafpad would work or not while in chroot environment.  We'll just switch to using a terminal based text editor called nano.  (You don't have to install it -- it's already included in LL.)

Before doing anything, shutdown and reboot again into live LL so you start off fresh.  In last post it showed that when you went to mount the root partition it was already mounted.  So, to make sure all steps work as expected, shutdown/restart first.

NOTE:  If you still have same terminal open and your prompt still reads as "root@linux:/#", run following commands in the terminal before rebooting.
Code:
exit
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt



Once rebooted fresh, open a terminal and do the first two steps in my last post exactly as shown before to mount the root partition and chroot into it.  Then, instead of doing the leafpad command to open the grub file, use this command:

Code:
nano /etc/default/grub

That will open the file in the terminal instead of trying to open a new graphical window like the leafpad command was doing.

You need to use your keyboard's arrow keys to position the cursor to where the change needs to be made.  Just delete the "0.0" and replace it with a "5" on the "GRUB_TIMEOUT=" line.

Then save the file by using the key combination of <CTRL>+O (the letter "O", not number "0").  In other words, hit <CTRL> key and the letter "O" key at the same time.

Then exit nano editor using key combination <CTRL>+X.

You should then be back at the terminal prompt.

Continue on with the last two steps above to update grub, exit chroot and unmount the partition.

Shutdown/Reboot without the LL dvd/usb and see if it worked.
Try Linux Beginner Search Engine for answers to Linux questions.
Reply
#17
Thank you very much gold_finger for the detailed and step by step guide. I so much appreciate you solving my problem and teaching me as well, that i'm half wishing i break things again so i can learn some more.

Thank you !
Reply
#18
You're welcome thoughtinstinct -- glad everything worked out.  Enjoy LL!  Smile
Try Linux Beginner Search Engine for answers to Linux questions.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)