Can't backup /boot/grub/menue.lst

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nctarheel704

Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

I am tryin to setup dual booting on my latop. When I try to open the /boot/grub/menue.lst with "sudo gedit /boot/grub/menu.lst" gedit comes up blank. What should I do? I am using Mint 8 Helena and trying to dual boot vista
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mike65

Re: Can't backup /boot/grub/menue.lst

Post by Mike65 »

mint 8 uses grub 1.97-beta4. there is no menu.lst. There is /boot/grug/grub.cfg
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

Is that what I should copy them. I am using this guide " http://apcmag.com/how_to_dualboot_vista ... htm?page=1". I just want to be sure I don't screw anything up while doing this. I was just review that guieds and it talks a lot about the .lst file. since I have the .cfg would it work in the same way?
3ss

Re: Can't backup /boot/grub/menue.lst

Post by 3ss »

read these posts, I found them quite helpful:

http://forums.linuxmint.com/viewtopic.php?f=46&t=38034 (specifically on dualbooting Windows)

https://wiki.kubuntu.org/Grub2 (on Grub2)
kansasnoob

Re: Can't backup /boot/grub/menue.lst

Post by kansasnoob »

There should be no need to back up anything in grub2. Recovering grub2 after installing Windows is different than explained in that APC guide:

http://www.openpeta.com/index.php/how-t ... tallation/

I compressed things a bit:

Code: Select all

sudo mount /dev/sdXY /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo chroot /mnt
NOTE: the XY must be replaced by the proper destination, ie: /dev/sda1

Code: Select all

grub-install /dev/sdX
NOTE: the X must be replaced by the proper designation, ie: /dev/sda

If the grub-install command returns any errors:

Code: Select all

grub-install --recheck /dev/sdX
Then just:

Code: Select all

exit
and:

Code: Select all

sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt
Then the first time you boot into Mint run:

Code: Select all

sudo update-grub
And it should find Windows for you.
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

how do I get back into Mint? All it will load now is windows. I don't know where my Mint Live CD is but I have a ubuntu one. Will that work?
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

Ok. I have the bootloader detecting windows. When I try to launch it it goes right back to the bootloader.
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

Before doing anything, back up any valuables. Burning a copy of "Super GRUB Disk" should probably happen also.

Karmic will work. Use instructions here to use live CD to restore grub and make a menuentry (METHOD 3 perhaps): https://help.ubuntu.com/community/Grub2
If you get to the point where grub loads its menu and at least one OS, that's a start. Post back if you need help configuring the /boot/grub/grub.cfg Menu List for GRUB at boot.

Run this script from the Live CD or from Mint if you still have trouble booting anything: http://ubuntuforums.org/showthread.php?t=1291280

Post the contents of the file RESULTS.TXT here.

also post /boot/grub/device.map if you can get to it.
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

I'm sorry. Let me be a little more specific. I can load mint with no problem from the bootloader. It windows that I can't start. I will do what you said and post the results.

Same result after restoring grub. Mint boots fine from bootloader,but windows makes bootloader restart.

device map
(fd0) /dev/fd0
(hd0) /dev/sda

Results.txt
============================= Boot Info Summary: ==============================

=> Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
sda1: _________________________________________________________________________

File system: ext4
Boot sector type: Grub 1.97
Boot sector info: Grub 1.97 is installed in the boot sector of sda1 and
looks at sector 3254263 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System: Linux Mint 8 Helena - Main
Edition
Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.cfg /etc/fstab
/boot/grub/core.img

sda2: _________________________________________________________________________

File system: ntfs
Boot sector type: Grub 1.97
Boot sector info: Grub 1.97 is installed in the boot sector of sda2 and
looks at sector 3256295 of the same hard drive for
core.img, core.img is at this location on /dev/sda and
looks on partition #1 for /boot/grub. No errors found
in the Boot Parameter Block.
Operating System: Windows Vista
Boot files/dirs: /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda3: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xf9535e7e

Partition Boot Start End Size Id System

/dev/sda1 63 99,201,437 99,201,375 83 Linux
/dev/sda2 * 99,203,072 304,302,079 205,099,008 7 HPFS/NTFS
/dev/sda3 304,303,230 312,576,704 8,273,475 f W95 Ext d (LBA)
/dev/sda5 304,303,293 312,576,704 8,273,412 82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

sda1: UUID="59d0876e-6918-42f8-923c-16669d97423e" TYPE="ext4"
sda2: UUID="D2A07136A07121E1" TYPE="ntfs"
sda5: UUID="bf8878bc-f18d-43b0-8667-1e2c12d614ec" TYPE="swap"

=============================== "mount" output: ===============================

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/travis/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=travis)


=========================== sda1/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=59d0876e-6918-42f8-923c-16669d97423e ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=59d0876e-6918-42f8-923c-16669d97423e

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Linux Mint 8 Helena - Main Edition, kernel 2.6.31-14-generic
uuid 59d0876e-6918-42f8-923c-16669d97423e
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=59d0876e-6918-42f8-923c-16669d97423e ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic

title Linux Mint 8 Helena - Main Edition, kernel 2.6.31-14-generic (recovery mode)
uuid 59d0876e-6918-42f8-923c-16669d97423e
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=59d0876e-6918-42f8-923c-16669d97423e ro single
initrd /boot/initrd.img-2.6.31-14-generic

title Linux Mint 8 Helena - Main Edition, memtest86+
uuid 59d0876e-6918-42f8-923c-16669d97423e
kernel /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

=========================== sda1/boot/grub/grub.cfg: ===========================

#
# 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,1)
search --no-floppy --fs-uuid --set 59d0876e-6918-42f8-923c-16669d97423e
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/06_mint_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 59d0876e-6918-42f8-923c-16669d97423e
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (/dev/sda1)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 59d0876e-6918-42f8-923c-16669d97423e
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=59d0876e-6918-42f8-923c-16669d97423e ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 59d0876e-6918-42f8-923c-16669d97423e
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=59d0876e-6918-42f8-923c-16669d97423e ro single
initrd /boot/initrd.img-2.6.31-14-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 "Windows Vista (loader) (on /dev/sda2)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set d2a07136a07121e1
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.
menuentry "Windows Vista" {
insmod chain
insmod ntfs
search --fs-uuid --set d2a07136a07121e1
chainloader +1
}

### END /etc/grub.d/40_custom ###

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=59d0876e-6918-42f8-923c-16669d97423e / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=bf8878bc-f18d-43b0-8667-1e2c12d614ec none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

=================== sda1: Location of files loaded by Grub: ===================


.0GB: boot/grub/core.img
.0GB: boot/grub/grub.cfg
.0GB: boot/grub/menu.lst
.0GB: boot/grub/stage2
.0GB: boot/initrd.img-2.6.31-14-generic
.0GB: boot/vmlinuz-2.6.31-14-generic
.0GB: initrd.img
.0GB: vmlinuz
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

Wow. Real quick post the output of:

Code: Select all

sudo fdisk -l
df -hT
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

Oh boy, I see a couple different oddities. OK, which method or disk did you use to restore grub? I'm not sure how you got to this point, did you have Mint 7 on there before?

It seems that the Vista bootloader is missing. However /dev/sda2 your NTFS partition is marked as the boot partition and has grub2 on the bootsector which points to /dev/sda1 grub and kernel files. And the MBR of your /dev/sda has grub legacy.

Here is the plan; backup any important files anywhere on your drive. Boot to your Mint Installation. First backup the mbr and bootsectors.

EXTREME CAUTION, DON'T MISTYPE dd commands, they can overwrite disc sectors easily:
This will back up your hard drive's master boot record and partition table.

Code: Select all

sudo dd if=/dev/sda of=mbr0.bin count=1 bs=512 
Now, backup your Partition Boot Records (pbr - aka boot sectors):

Code: Select all

sudo dd if=/dev/sda1 of=pbr1.bin count=1 bs=512
sudo dd if=/dev/sda2 of=pbr2.bin count=1 bs=512
To recap /dev/sda2 is marked bootable, and right now you have grub2 on the /dev/sda2 boot sector pointing to partition #1 (/dev/sda1) for /boot/grub.

Assuming you don't see anything windows related when you try to boot, I think maybe you wrote over the Vista boot loader with grub2. Your menu entry looks sane on your 40_custom, but try it with the --set after your UUID.

I don't think that will work, because I think the Vista Loader needs to be restored using a Vista CD or Recovery Environment (BootRec /FixBoot), but first also mark /dev/sda1 as bootable, and install grub to the MBR of /dev/sda and point to your regular directory.

First, copy your mbr and pbr files to an external storage device, then use gparted, cfdisk, or fdisk to mark partition 1 (/dev/sda1) as bootable.

Next, install grub2 to the mbr of your HD (note /dev/sda means the whole drive, and /dev/sda1 means the first partition. There is only one mbr per drive, but each partition has a pbr).
Check the version of grub-install (should be 1.97 or so, not 0.XX - that's grub legacy):

Code: Select all

grub-install -v
If it is legacy, let me know.

Install grub2 to MBR of HDD:

Code: Select all

sudo grub-install /dev/sda
NOT /dev/sda1 or /dev/sda2

Check the device.map text file, edit to correct if needed, and re-run grub-install:

Code: Select all

cat /boot/grub/device.map
Run your update-grub:

Code: Select all

sudo update-grub
Make sure you have a Live CD in case something goes wrong, reboot, double check your BIOS setup and make sure it is trying to boot from the first disk.
Hopefully the GRUB 1.97 MENU will load, and you will see your entries. At this point boot Mint, because Windows Vista still needs her loader.
Boot to Mint, backup your new mbr:

Code: Select all

sudo dd if=/dev/sda of=mbr0-grub2.bin count=1 bs=512 
Save to flash drive or whatever.

NOW, boot your Vista Recovery Environment and do your Vista boot sector recovery on your second pbr (/dev/sda2):

Code: Select all

BootRec /FixBoot
Now try your Vista menu entry.

If things go wrong, boot to a Live CD and restore your old mbr, but leave the partition table alone (hence bs=446):

Code: Select all

sudo dd if=mbr0.bin of=/dev/sda count=1 bs=446
Then let me know what happened.

Good luck, backup your files, and be careful what you type!
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

here is the sudo fdisk and other command you asked for. The only thing I am worried about loosing is my 16 gigs of music and movies. I will back them up, and start running the next set of commands. thank you for your help.


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf9535e7e

Device Boot Start End Blocks Id System
/dev/sda1 1 6176 49600687+ 83 Linux
/dev/sda2 * 6176 18942 102549504 7 HPFS/NTFS
/dev/sda3 18943 19457 4136737+ f W95 Ext'd (LBA)
/dev/sda5 18943 19457 4136706 82 Linux swap / Solaris
travis@travis-laptop ~ $ df -ht
df: option requires an argument -- 't'
Try `df --help' for more information.
travis@travis-laptop ~ $ df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 47G 36G 8.9G 80% /
udev tmpfs 691M 288K 690M 1% /dev
none tmpfs 691M 296K 690M 1% /dev/shm
none tmpfs 691M 204K 690M 1% /var/run
none tmpfs 691M 4.0K 691M 1% /var/lock
none tmpfs 691M 0 691M 0% /lib/init/rw
/dev/sr0 iso9660 699M 699M 0 100% /media/cdrom0

When I try to run BootRec /FixBoot from the recovery cd i get the error (Volume does not contain a recognizable file system). I know that windows is installed because i ran the scanos command and it found windows installed. I havent done much with the windows itself. Would doing a reinstall help?
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

Well, that doesn't sound good. Is there a way to select the second partition first before using the /fixboot?

Otherwise, your only choice would be to reinstall Vista to your second partition, it will overwrite your grub2 MBR, but that is not a problem if you backed up your MBR first. Try to install Vista without formatting the partition, otherwise your music will be gone.

So, you backed up your data, and you have your mbr0-grub2.bin file saved to a CD or flash drive...

Reinstall Vista (be aware you could accidentally install over Mint at this point).
Now Vista will boot, but it will take over the bootloader/MBR, so...
Boot your Live CD, access your backup MBR (the second backup), and restore your backup:

Code: Select all

dd if=/path/to/mbr0-grub2.bin of=/dev/sda count=1 bs=446
(replace /path/to with the path that is mounted and has your MBR backup).

Reboot, you should have grub2 menu, boot to your Mint installation, run your

Code: Select all

sudo update-grub
and it should correct your Windows menu entry for grub2.

Reboot, pick Vista, win?
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

The media is stored on the Mint partition so I should loose anything by reinstalling windows on its own partition should I? I will do the reinstall and let you know how everything goes.
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

You never know what you might lose in these situations, so a backup is recommended.

Good luck and Happy New Year!
nctarheel704

Re: Can't backup /boot/grub/menue.lst

Post by nctarheel704 »

Happy new year to you to. Ok I re-installed windows, and replaced the mbr with the back I made. Now when I start the computer just the words Grub come up then it hangs there. I really suck at this maybe I should leave this alone.
breaker

Re: Can't backup /boot/grub/menue.lst

Post by breaker »

Don't give up, just boot to your Live CD and reinstall GRUB to your MBR that way instead, use the chroot method on this wiki: https://help.ubuntu.com/community/Grub2 ... m%20LiveCD
METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1. Boot to the LiveCD Desktop (Ubuntu 9.10 or later).
2.

Open a terminal - Applications, Accessories, Terminal.
3. Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l
* If you aren't sure, run

df -Th. Look for the correct disk size and ext3 or ext4 format.
4. Mount your normal system partition:
* Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt # Example: sudo mount /dev/sda1 /mnt
5.

Only if you have a separate boot partition:
* sdYY is the /boot partition designation (examply sdb3)
*

sudo mount /dev/sdYY /mnt/boot
6. Mount devices:

sudo mount --bind /dev/ /mnt/dev
7. To ensure that only the grub utilities from the LiveCD get executed, mount /usr

sudo mount --bind /usr/ /mnt/usr
8. mount proc filesystem

sudo mount --bind /proc/ /mnt/proc
9. Chroot into your normal system device:

sudo chroot /mnt
10. If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub
11. Reinstall GRUB 2:
*

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX
12.

Verify the install (use the correct device, for example sda. Do not specify a partition): sudo grub-install --recheck /dev/sdX
13.

Exit chroot: CTRL-D on keyboard
14. Unmount devices:

sudo umount /mnt/dev
* If you mounted a separate /boot partition:

sudo umount /mnt/boot
15. Unmount last device:

sudo umount /mnt
16. Reboot.

reboot

Post-Restoration Commands

Once the user can boot to a working system, try to determine why the system failed to boot. The following commands may prove useful in locating and/or fixing the problem.

*

To refresh the available devices and settings in /boot/grub/grub.cfg
o

sudo update-grub
To look for the bootloader location.
o

grub-probe -t device /boot/grub

To install GRUB 2 to the sdX partition's MBR (sda, sdb, etc.)
o

sudo grub-install /dev/sdX
To recheck the installation. (sda, sdb, etc.)
o

sudo grub-install --recheck /dev/sdX
This will work the same with the Mint 8 Helena Live CD.

Your Mint device should be /dev/sda1 but use fdisk to double check

Code: Select all

sudo fdisk -l
So, follow the directions, try to mount /dev/sda1

Code: Select all

sudo mount /dev/sda1 /mnt
Double check it is your mint partition by listing the directory:

Code: Select all

ls /mnt
or using the command

Code: Select all

df -hT
Following the guide above, after mounting, the rest of your grub2 restoration should go like this:

Code: Select all

sudo mount --bind /dev/ /mnt/dev

Code: Select all

sudo mount --bind /usr/ /mnt/usr

Code: Select all

sudo mount --bind /proc/ /mnt/proc

Code: Select all

sudo chroot /mnt

Code: Select all

update-grub
IN THE STEP BELOW, DO NOT USE /dev/sda1 USE /dev/sda (without the "1")

Code: Select all

grub-install /dev/sda

Code: Select all

sudo grub-install --recheck /dev/sda
Exit chroot: CTRL-D on keyboard

Code: Select all

sudo umount /mnt/dev

Code: Select all

sudo umount /mnt
Reboot... see below...

If you get GRUB reinstalled, boot to Mint, then proceed with the rest of the instructions from my previous post, that is, even though you did an "sudo update-grub" from Live CD, do it from your regular install.

Next reboot, try to load Windows, if that fails let me know, your menu entry for Windows might need to be tweaked.

Sorry this has been a hassle, but experiences like these can be great for learning, even though time consuming. :)
Locked

Return to “Installation & Boot”