-   Linux - Laptop and Netbook (
-   -   Problem with GRUB/WIn7/SRS4 Recovery partition Samsung N110 netbook (

__spc__ 02-25-2011 03:00 AM

Problem with GRUB/WIn7/SRS4 Recovery partition Samsung N110 netbook
I have a Samsung N110 which came with Windows 7 Starter and which I upgraded to Windows 7 Home Premium using the 'anytime upgrade' path. On first switching the netbook on, I partitioned the HDD as 40 GB C: 'Windows' and 200 GB D: 'Data'. There is also a Samsung Recovery Solution 4 (SRS4) hidden partition of ~10 GB ('RECOVERY') and a further 104 MB hidden partition. (This allows you to 'hit' F4 at boot and go straight into the Windows Recovery process and restore a backup image of a functioning system.)

I recently installed Kubuntu 10.04.25 LTS. The installation process shrunk my D: drive (the fourth/last primary partition) by 20 GB and turned it into an extended partition, creating two new partitions - 'Linux' and 'swap'. The partitioner element of the install process gave me three options as part of doing this - manually create partitions, format the entire drive and create partitions, or create partitions automatically alongside existing O/S (which I selected).

The install proceeded flawlessly, Kubuntu is awesome, and the GRUB boot-loader gave the following boot options:
- Linux
- Linux (Recovery)
- Memtest
- Memtest (I forget the version)
- Windows Vista boot-loader on /dev/sda1
- Windows 7 boot-loader on /dev/sda3

I could boot perfectly into Linux and Windows 7 with ease, and did so many times.

Now, the PROBLEM! I was interested by the Windows Vista option at boot, so I selected it - this then ran the SRS4 recovery program, which I exited properly and had the machine restart. So, fine, happy with all that (as this is the same as pressing F4 at boot - which also worked).

HOWEVER, on restart, the netbook would enter an infinite loop of
- Power on, then
- Splash screen (showing F2 for BIOS, F4 for recovery), then
- BIOS password entry, then
- Blank screen and reboot.

F2 allows me into the BIOS, but F4 does nothing.

So somehow, running the SRS4 from the GRUB boot-loader and then exiting, managed to mess up GRUB...?

I then spent hours (!) trying to recover my system using the USB stick 'live CD' I used for the installation. I could run the 'live' system, then mount all my partitions on the netbook, but I just could not get GRUB to return to its original state again. I'm not saying GRUB wouldn't do it, my grasp of GRUB is just not sufficient to make it do it...

Ultimately, I ended up reinstalling Kubuntu so I could get GRUB to function properly. Now this time, I could not use the 'install alongside other O/S' option or else the installer would ignore the existing Linux partitions and create more, further shrinking my D: drive! So, I used the manually mount partitions option.

I now have GRUB working fine, but it refuses to see the Windows 7 partition and I only have the Vista boot-loader option. (Which selecting then kills my system again!)

From within my working Kubuntu, here are some outputs:

'fdisk -l'

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0e2792a7

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1403 11268573+ 27 Unknown
/dev/sda2 1404 1416 104422+ 7 HPFS/NTFS
/dev/sda3 1417 6638 41945715 7 HPFS/NTFS
/dev/sda4 6639 30402 190878634+ f W95 Ext'd (LBA)
/dev/sda5 6639 27978 171408382+ 7 HPFS/NTFS
/dev/sda6 27978 30295 18611200 83 Linux
/dev/sda7 30295 30402 857088 82 Linux swap / Solaris

/dev/sda1 is the RECOVERY partition
/dev/sda3 is the C: WIn7 partition
/dev/sda4 is the extended partitoin, on which sit
/dev/sda5 D: Data
/dev/sda6 Linux
/dev/sda7 swap

So, please, if anyone can help me get access back to Windows 7 and my dual boot arrangement that would be fantastic. Also, if someone could give me a hint as to why this all happened in the first place, that would be great, too!

(I have cross-posted this also in Sammy Netbook Forums...)

Thanks in advance for ANY help with this - I spent 7hrs of unsuccessful self-help yesterday!

syg00 02-25-2011 07:41 AM

Generally the recovery systems I've used try to set the machine back to the way it was - partition-wise.
Hard to know in your case as you've subsequently re-run the kubuntu install. What does the /boot/grub/grub.cfg look like (post it here).

__spc__ 02-25-2011 08:05 AM


Thanks for the quick reply.

My cfg file is below.

I'm guessing there's something about "set root='(hd0,1)'", where this should be something like set root='(hd0,3)'?? The '*' has me a little confused in the fdisk output...

# 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 $prefix/grubenv ]; then
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true

function savedefault {
if [ -z ${boot_once} ]; then
save_env saved_entry

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
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
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
set timeout=10
### END /etc/grub.d/00_header ###

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

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=f95a2e38-855d-4efc-a025-ab5d9dfb0b60 ro splash quiet splash
initrd /boot/initrd.img-2.6.32-28-generic
menuentry 'Ubuntu, with Linux 2.6.32-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
echo 'Loading Linux 2.6.32-28-generic ...'
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=f95a2e38-855d-4efc-a025-ab5d9dfb0b60 ro single splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-generic
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
linux16 /boot/memtest86+.bin
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set f95a2e38-855d-4efc-a025-ab5d9dfb0b60
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/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 26de284dde281797
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 ###

syg00 02-25-2011 08:41 AM

The asterisk in the fdisk listing is just an indicator for the boot flag - not used by grub: don't worry about it.

From a terminal, run "sudo update-grub", and see if the grub.cfg changes. Else you may need to set up a custom entry.

__spc__ 02-25-2011 08:54 AM

'sudo update-grub' no change - still only sees the /dev/sda1

I'm firstly puzzled how running the 'O/S' on /dev/sda1 resulted in the mbr (?) changing to create all this aggravation in the first place

Secondly, I'm puzzled why NOW the Kubuntu installation process does not see the O/S on /dev/sda3. (It did on the very first install..)

EDDY1 02-25-2011 11:07 AM

Before you update-grub, open disk manager and mount sda2


use "su" or "sudo" depending on your setup.

EDDY1 02-25-2011 11:07 AM

Before you update-grub, open disk manager and mount sda2


use "su" or "sudo" depending on your setup.

__spc__ 02-25-2011 11:25 AM

Disk Manager..?

I can mount with sudo mount -t ntfs /dev/sda2 /mnt/temp

Something like that? Will it matter where I mount it for now?

Thanks for your attention on this!

---------- Post added 25-02-11 at 05:26 PM ----------

Disk Manager..?

I can mount with sudo mount -t ntfs /dev/sda2 /mnt/temp

Something like that? Will it matter where I mount it for now?

Thanks for your attention on this!

EDDY1 02-25-2011 11:49 AM

It doesn't matter How you do it. I just offer the easiest way to mount.
On some of my installations os wasn't detected until I mount and run commands.

__spc__ 02-25-2011 12:14 PM

OK, I'm just new to Ubunutu (I did use Slackware many years ago).

/dev/sda2 fails to mount...

$ sudo mount -t ntfs /dev/sda2 /mnt/tmp
Unexpected clusters per mft record (-1).
Failed to mount 'dev/sda2': Invalid argument
The device '/dev/sda2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

HPFS fails too.

Any ideas?

EDDY1 02-25-2011 01:13 PM

Use the disk manager and mount them as there's no command it only asks for password.
Or you can open Computer and just click on each disk to mount them. They'll appear on desktop when they're mounted.

__spc__ 02-25-2011 01:33 PM

I don't know what you mean by 'disk manager' (in the context of Kubuntu). Which application should I be running.

Windows C:, Data D: and the RECOVERY partitions are all set to mount in the root directory (as per the Kubuntu installation program - it asked for mount points during install. I did not set the 'mystery' partition /dev/sda2 to mount.

In fact, I cannot see /dev/sda2 anywhere using any application.

I'm sorry for being dim here - very dim. I'm perfectly savvy with Windows and Slackware, and with this my first foray into netbook/linux and Ubuntu, I've never come across this problem before.

EDDY1 02-25-2011 04:06 PM

The disk manager on my ubuntu installation is under
Sorry it's called Didk Utility in Ubuntu.
System>>Administration>>Disk Utility.

syg00 02-25-2011 11:40 PM

update-grub runs os-prober - no need (or benefit) from running it separately. The fact that it doesn't find the the sda2 system is a worry - as is the messages in post #10. Try "sudo parted -l /dev/sda" - it tries to determine the f/s rather than just listing the partition table.

__spc__ 02-26-2011 03:59 AM


Thanks for all your input - here's how I fixed this problem.

1. Indications were that /dev/sda2 was corrupt
2. I used my Win7 recovery disk (my own, created from my system, not a downloaded one) to repair the system (and at least get Win7 working again). Win7 was detected, but the first repair failed and left things unchanged. A second attempt, using the DOS/CMD.EXE console faield as 'bootrec /fixmbr' worked, but 'bootrec /fixboot' returned a corruption error. A 3rd attempt, again using the 'auto' repair route worked and got me Win7 back.
3. Back in Windows 7, I saw that the troublesome 104MB (/dev/sda2) partition was now mountes as RAW at E:. I then removed its disk label to hide it from Windows using one of the All Programs > Administration, tools (I forget the name). I then rebooted, using the Kubuntu Live USB.
4. I reinstalled Grub2 from the Kubuntu Live/Installation USB as per:, specifically, from an xterm:

sudo -i
mount /dev/sda6 /mnt (my Linux partition, which has on it the /boot location)
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub (I saw that this found Win7 on /dev/sda1 and NOT Vista boot-loader)
grub-install --root-directory=/mnt/ /dev/sda
exit (I forgot to unmount the 3 mounts above)

Rebooted and voila, a GRUB menu, with Linux, Memtest and Windows 7 available.

Actually, it's better than 'back to normal' as the original Kubuntu installation recognised the Samsung Recovery Solution 4 RECOVERY partition as an operating system and presented that in the GRUB2 boot menu. So, all solved... apart from why selecting the Windows Vista boot-loader option killed the system! (Now, that option doesn't exist.)

All times are GMT -5. The time now is 01:08 PM.