Showing posts with label Grub. Show all posts
Showing posts with label Grub. Show all posts

Thursday, 23 March 2017

Remove 'hiberfile' from Windows 10 Installation

If update-grub drops your Windows installation, first create a folder to mount the Windows partition in (e.g. home/yourname/temp), then run the following (changing values as needed):
sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda3 /home/yourname/temp
Then update Grub again:
update-grub

Monday, 19 January 2015

Restoring GRUB2 (Antergos)

Method One:

Boot Live CD and run the following command to determine where your Antergos/Arch/Manjaro partition is.
blkid
Mount it.
mount /dev/sda5 /mnt
Change root directory.
mount -t proc proc /mnt/pro
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts/
chroot /mnt Install mtools and os-prober.
pacman -S mtools os-prober
Install to dev/sda (or whichever your mbr is.)
grub-install /dev/sda
Update and configure GRUB
grub-mkconfig -o /boot/grub/grub.cfg exit


Method Two: 

pacman -S arch-install-scripts --noconfirm 
mount /dev/sda? /mnt (Change sda? to your own configuration for root.) 
mount /dev/sda? /mnt/boot (Only if you have a separate boot partition.)
arch-chroot /mnt
grub-install --target=i386-pc --recheck --debug /dev/sda (No partition number, just the sda/sdb part.) 
grub-mkconfig -o /boot/grub/grub.cfg
exit

Wednesday, 23 January 2013

Reinstalling GRUB2 (Manjaro)

Load up a live distro of Manjaro. Determine the partition where Manjaro is installed. (Example /dev/sda2).
blkid
Mount the partition:
mount /dev/sda5 /mnt
Mount the swap:
swapon -a

Sunday, 3 July 2011

Reinstalling GRUB2 (Ubuntu 11.04)

First, find out where Ubuntu is installed on your hard disk...
sudo fdisk -l
You should see something like....
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 7 NTFS
/dev/sda2 2612 60279 463218210 83 Linux
/dev/sda3 60280 60801 4192965 5 Extended
My Ubuntu partition is /dev/sda2. The partition now needs mounting...
sudo mount /dev/sda2 /mnt
To install the GRUB2 boot loader, type...
sudo grub-install --root-directory=/mnt /dev/sda
Note, that's /dev/sda (The hard disk itself) NOT The Ubuntu partition /dev/sda2. Once completed unmount the partition and reboot...
sudo umount /dev/sda1 ; sudo reboot
NB -- If you have more than one OS installed, re-detect your various Operating Systems with...
sudo update-grub
 ** Do this before unmounting the partition.

Saturday, 28 May 2011

Solving "Input Signal Out of Range" Error on Bootup

After installing Ubuntu, on restart, the error warning "Input Signal out of range" error can come up. To fix it, open a terminal and type...
gksudo gedit /etc/default/grub
... and unhash the line...
#GRUB_GFXMODE=640x480
 ... so it reads...
GRUB_GFXMODE=640x480
 ... or whatever resolution you desire, then save and exit the document.

Then type...
sudo update-grub

Thursday, 11 February 2010

Crash - Backup!

grub.conf

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro single
initrd /boot/initrd.img-2.6.31-19-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 42ec6cd1ec6cc0b1
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

/etc/X11/xorg.conf

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 24.0 - 80.0
Vertrefresh 50.0 - 75.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

/etc/fstab

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
#

proc /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df / ext4 errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=04bbfabb-2bb2-4feb-bbb5-726f7ee4781c /home ext4 defaults 0 2
# Entry for /dev/sda6 :
UUID=d3a3ecd4-7a0c-4ca4-86e9-80b6018f076b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb2 /media/Archives ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb8 /media/Video ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb1 /media/Audio ntfs-3g defaults,locale=en_GB.UTF-8 0 0

Saturday, 27 December 2008

Reinstalling GRUB


You can try re-installing the grub using the Ubuntu Live CD, in two different ways.

GUI

1. Boot your computer up with Ubuntu CD
2. Go through all the process until you reach "[!!!] Disk Partition"
3. Select Manual Partition
4. Mount your appropriate linux partions / /boot swap .....
5. DO NOT FORMAT THEM.
6. Finish the manual partition
7. Say "Yes" when it asks you to save the changes
8. It will give you errors saying that "the system couldn't install ....." after that
9. Ignore them, keep select "continue" until you get back to the Ubuntu installation menu
10. Jump to "Install Grub ...."
11. Once it is finished, just restart your computer

Command line

1. Boot your computer up with Ubuntu CD
2. Open a terminal window or switch to a tty.
3. Go SuperUser (that is, type "sudo -s"). Enter root passwords as necessary.
4. Type "grub"
5. Type "find /boot/grub/stage1". You'll get a response like "(hd0,1)". Use whatever your computer spits out for the following lines.
6. Type "root (hd0,1)", or whatever your hard disk + boot partition numbers are for Ubuntu.
7. Type "setup (hd0)", to install GRUB to MBR, or "setup (hd0,1)" or whatever your hard disk + partition nr is, to install GRUB to a partition.
8. Quit grub by typing "quit".
9. Reboot and remove the bootable CD.

Wednesday, 25 April 2007

Editing the GRUB installer after a clean install (Mepis 6.5)

Allow your machine to boot into GRUB. Choose an OS from the menu and click enter. GRUB will try to load but will quickly come up with an error 22, stating that the partition doesn't exist, or some such. It will then revert back to a text version of GRUB. Again, highlight an OS, but instead of pressing "enter" press "e" to go into edit mode. You can then manually change the text string from hd1,2 to hd0,2, hit enter and then "b" (to boot).

After Mepis has loaded, with super user privileges, edit the /boot/grub/menu.lst files to make the changes permanent.

Your menu.lst file should look something like this......

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS - newest kernel
root (hd0,4)
kernel /boot/vmlinuz root=/dev/sda5 nomce quiet vga=791 resume=/dev/sda6
boot

title MEPIS - previous kernel (if any)
root (hd0,4)
kernel /boot/vmlinuz.old root=/dev/sda5 nomce quiet vga=791 resume=/dev/sda6
boot

title MEPIS - kernel 2.6.15-27-desktop
root (hd0,4)
kernel /boot/vmlinuz-2.6.15-27-desktop root=/dev/sda5 nomce quiet vga=791 resume=/dev/sda6
boot

title Windows XP
rootnoverify (hd0,0)
chainloader +1


title MEMTEST
kernel /boot/memtest86+.bin

Save the file and then reboot. You should now be able to log into either OS on the menu.