• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Help with Build Enviorment Fail

haro138

Well-Known Member
Okay, so I was trying to set up a build environment on my laptop. My laptop being relatively new came with all sorts of partitions. 1MB unknown | 100 MB system | ~500 GB Windows 7 | Recovery | and HP Tools. I shrunk the windows partition by 20 gigs with disk management. I tried to install ubuntu on the newly made space and it installed there AND in the recovery section. The install ended up failing. I spent a good chunk of time googling and trying different things. Long story short I managed to install Ubuntu but messed up something with windows. When I try to boot in to windows I get this message along the lines of it can't boot in to it use a recovery disk.

I tried using a windows 7 install disk and using different bootrec commands I think it was. I also tried the automated fix and neither worked. It is not even recognizing windows as being installed.

After looking around I think I might have installed grub to my windows boot sector but am not certain as how to fix this. My current HDD consists of 1MB UNKNOWN | 209 MB system NTFS | 459 GB NTFS | 41 GB EXT4. The 459 partition still has all my windows stuff I backed up. The 41 GB partition has ubuntu.

Does anyone know how to make windows boot again? Does anyone know of a good linux forums site where I could get some more help? I would like to avoid installing windows again but at this point I think that's what I would have to do. Thank you all in advance.
 
What you did was, screwed up windows mbr (master boot record

If anyone here has never worked with linux before and are thinking of dual booting, backup everything you need/want.

The easy way is to install windows first, then linux , especially if a new person to linux to avoid all headaches at all costs.

HP usually has recovery partitions, which looks like is screwed up right now. I am at work, so it;s hard right now to help.

Curious to know what the output of
Code:
df -h
and
Code:
ls -la /dev/disk/by-uuid/
says.

Have a look here for possible fixes


installing linux screwed my windows mbr
 
Filesystem Size Used Avail Use% Mounted on
/dev/sda4 38G 13G 24G 35% /
none 1.9G 268K 1.9G 1% /dev
none 1.9G 1.2M 1.9G 1% /dev/shm
none 1.9G 256K 1.9G 1% /var/run
none 1.9G 0 1.9G 0% /var/lock


total 0
drwxr-xr-x 2 root root 100 2012-03-15 15:51 .
drwxr-xr-x 6 root root 120 2012-03-15 15:51 ..
lrwxrwxrwx 1 root root 10 2012-03-15 22:52 1618D5D618D5B549 -> ../../sda3
lrwxrwxrwx 1 root root 10 2012-03-15 22:52 b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc -> ../../sda4
lrwxrwxrwx 1 root root 10 2012-03-15 22:52 C61CD08A1CD076C1 -> ../../sda2

AND here's an additional script I found that reassures me your right.

Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 4 for (,msdos4)/boot/grub.

sda1: __________________________________________________________________________

File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''

sda2: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD

sda3: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /bootmgr /boot/BCD /Windows/System32/winload.exe

sda4: __________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 63 2,047 1,985 42 SFS
/dev/sda2 * 2,048 409,599 407,552 42 SFS
/dev/sda3 409,600 897,034,239 896,624,640 42 SFS
/dev/sda4 897,034,240 976,771,119 79,736,880 83 Linux


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda2 C61CD08A1CD076C1 ntfs SYSTEM
/dev/sda3 1618D5D618D5B549 ntfs
/dev/sda4 b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc ext4

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sda4 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sr0 /media/ISOIMAGE iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)


=========================== sda4/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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 have_grubenv=true
load_env
fi
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
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.39-3-bb03' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
linux /boot/vmlinuz-2.6.39-3-bb03 root=UUID=b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc ro splash vga=789 quiet splash i915.modeset=1
initrd /boot/initrd.img-2.6.39-3-bb03
}
menuentry 'Ubuntu, with Linux 2.6.39-3-bb03 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
echo 'Loading Linux 2.6.39-3-bb03 ...'
linux /boot/vmlinuz-2.6.39-3-bb03 root=UUID=b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc ro single splash vga=789
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.39-3-bb03
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set C61CD08A1CD076C1
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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda4/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 nodev,noexec,nosuid 0 0
# / was on /dev/sda4 during installation
UUID=b5fcdf33-0412-47e8-8596-6e7f9c9ef2dc / ext4 errors=remount-ro 0 1
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

431.976776123 = 463.831531520 boot/grub/core.img 1
462.178958893 = 496.260878336 boot/grub/grub.cfg 1
431.382812500 = 463.193767936 boot/initrd.img-2.6.39-3-bb03 1
432.118553162 = 463.983763456 boot/vmlinuz-2.6.39-3-bb03 1
431.382812500 = 463.193767936 initrd.img 1
432.118553162 = 463.983763456 vmlinuz 1


The thing that sucks though is that in all the repair instructions that ended up being successful they ultimately used a windows disk and some variation of bootrec . When I try to use a windows disk no installations of windows are recognized.

And thanks for the help piper_
 
What I would do is probably not what you want to hear ;)

I would start from scratch using cfdisk/gparted/diskmanager, etc ... (google search helps for more apps) and completely wipe the disk (format).

Setup partitions the way you want them ... OS, Storage, etc ... then install windows first, then the linux operating system of your choice.

It sucks to do this, but, should only have to be done once, yes, time consuming
 
After all that is done and your a happy camper and then you go and install say windows 8, and now you lost your grub menu and can't boot into linux any more, you'll have to fix grub.

as root, in a terminal, in a live cd environment (in the example I will use sda6 as to where linux is installed)
Code:
mkdir -p /media/sda6

mount /dev/sda6 /media/sda6

/usr/sbin/grub-install --recheck --no-floppy --root-directory=/media/sda6 /dev/sda
Reboot and grub should be back with the choice of booting to either linux or windows
 
Back
Top Bottom