Booting windows 7 after hard drive removal (Boot Info Script results included)
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Booting windows 7 after hard drive removal (Boot Info Script results included)
I am running a computer Windows7/Ubuntu 11.10 dual bootable. Both OS installations are on the Secondary slave drive, The primary master was just for storage. I had to remove the primary master drive and afterwards I couldnt boot either OS. So i re installed Ubuntu 11.10 to the partition previously containing the Ubuntu install just to be able to start the computer. I am wondering how, if possible, to be able to boot the windows7. Ive looked into adding windows to the grub list. can someone please help? i do not want to reinstall windows and loose all important documents and files
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) 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
for on this drive.
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 /Windows/System32/winload.exe
--------------------------------------------------------------------------------
#
# 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
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=04b63c7a-f5fd-4bae-a554-97d651d6ae18 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=04b63c7a-f5fd-4bae-a554-97d651d6ae18 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-generic
}
### 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,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 04b63c7a-f5fd-4bae-a554-97d651d6ae18
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda5 during installation
UUID=04b63c7a-f5fd-4bae-a554-97d651d6ae18 / ext3 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=3c1c183e-d199-4ac6-b2e4-78509f8dcd39 none swap sw 0 0
--------------------------------------------------------------------------------
=================== sda5: Location of files loaded by Grub: ====================
unlzma: Decoder error
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
Last edited by briced; 01-01-2012 at 09:25 PM.
Reason: incorrect title
drew@drew-OptiPlex-GX270:~$ sudo update-grub
[sudo] password for drew:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
done
drew@drew-OptiPlex-GX270:~$
Windows is very bad about wanting it's installation on the first disk in the system. I would assume that if you forced it to install on the second disk, it installed it's bootloader on the first disk, which you removed. In XP, the most straight forward way to fix Windows was to use your Windows DVD to boot and go into "recovery Console" and run "fixboot". Win 7 has an automated system if If remember correctly. You may be able to use your Windows disk to repair the Windows bootloader, but that will most likely mess up the booting of your Linux installation and you would then have to repair that.
Windows is very bad about wanting it's installation on the first disk in the system. I would assume that if you forced it to install on the second disk, it installed it's bootloader on the first disk, which you removed.
The primary bootloader (not bootmgr and other peripheral windows boot files) set always in first sectors of a first primary (master) drive. When you install Grub in the same location (dev/sda), it read this date, and incorporate into itself so you get a boot menu entry in Grub and file ntldr renamed into grldr. But the first partition of the first prymary drive is removed, so any bootloader id killed.
Quote:
Originally Posted by purevw
In XP, the most straight forward way to fix Windows was to use your Windows DVD to boot and go into "recovery Console" and run "fixboot". Win 7 has an automated system if If remember correctly. You may be able to use your Windows disk to repair the Windows bootloader, but that will most likely mess up the booting of your Linux installation and you would then have to repair that.
True, it is vary easy process in Win Vista/7. But it often fails. May be need re installation of Win, without formatting partition, wit previous installation. Your old windows installation will be moved to "windows. old" folder not deleted.
You don't be worry about you data, it remains intact, if you will not remove or format partition with Windows installation. You can access to it under from Ubuntu, and copy to any safe location.
Your computer will boot to Windows 7 or Vista if you execute the following procedure.
Bootup from any Windows 7/Vista installation DVD or even from NeoSmart's free Windows 7 System Recovery Disk or Vista Recovery Disk.
Press a key when you see Press any key to boot from a CD or DVD.
Select your Language and then Time....
Select Repair your computer (bottom left of the Install now screen).
An automatic check of your system will run but will not identify GRUB control!
In System Recovery Options, highlight Windows 7, and click Next.
Click Command Prompt in System Recovery Options.
Type in, and press ENTER after each line (not case sensitive)
BOOTREC /FIXBOOT
BOOTREC /FIXMBR
(the Win7/Vista's boot sector/loader will be reinstalled).
EXIT
Now click Startup Repair in System Recovery Options.
Restart computer.
Windows should boot as originally.
Yes, that is the procedure I spoke of, but Arelatensis is correct when he says it does not generally work well. Hopefully it will be able to install the primary bootloader on the correct disk and your Windows installation will be back to normal. Just remember, when Windows repairs it's bootloader and the MBR of that disk, there will no longer be a link pointing the system to the grub bootloader. It will point to the Windows bootloader. So you will then have to fix your Linux installation.
Hi. No Idea if what I'm going to write will help to understand the problem, but here it is.
First, I think that installing a system on a secondary disk was a mistake, even if it worked; then, after you removed the main drive you might have tried to set the jumper of that secondary disk on "master", and still, this is of no use if the bootloader was installed on the original primary drive.
Concerning Windows, I discovered that in any case it is better to first install Windows, and then only Linux, because done otherwise Windows will erase the Linux bootloader.
Because this happened to me some time ago, I decided the best way to deal with the problem was to just reinstall everything in the correct order, on a correctly configured hard disk. I was by the way able to save first my personnal files with the help of a Linux livecd.
OK, so you have a Master and a Slave. Both operating systems are installed on the slave.
1. Understand that the Master is your boot drive.
2. It contains the Master Boot Record.
3. It is the Active Boot Device that is required to start GRUB.
4. With the Master removed, you have none of the above.
You might:
1. Make the Slave a Master by changing the connection port in a sata drive.
2. Change the Jumper from Slave to Master on an IDE drive.
3. Check your BIOS and make sure it is set to Master and Active if possible.
4. Re-Install GRUB on Slave and set up your Windows and Linux partitions as they do exist on the Slave.
My Recomendation:
Put back the Master and backup all your Documents, etc. to a USB or external HD.
Remove the Master and replace with the Slave.
Reinstall Linux. After all is running fine, Download Virtual box form Oracle.
Run Virtual box and once you get the installation screen, you can reinstall windows and run Windows as a virtual OS inside Linux.
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 91
Rep:
A furtherance
Hi.
This is on the same vein but in anticipation of an endeavor.
In my dual boot systems, I agree with the previous entry: I've found it best to install Windows first, then make it a dual boot machine. I've found it always dicey to mess with the primary/secondary disks when in the mix is a brain-dead operating system such as any Microsoft offerings.
I have Windows/XP on its own machine, my second machine is dual-boot.
Windows -- don't recall when I last used it
SuSE
CentOS -- my current Linux of choice.
My customer base is mostly Windows/XP, then Macintosh, then Linux, then alternative Windows:vista,7.
Both machines are old -- one's approaching a decade, the other I'm not sure doesn't have vacuum tubes.
I've decided when Windows/8 is out for a couple of months this Spring/Summer (and I have the cash-flow), that I'm getting a 64-bit machine with way too much memory and disk <.grin>
I'm getting it with Win/8 installed, when I get it home, I'll make it dual-boot CentOS. On the CentOS, I'll install VMWare so I can have differing Linuxes, either for supporting my customer base or for my own amusement and education. I can test my java development on multiple operating systems.
One of my partitions will be Win/8, so I can always have it live and I don't have to reboot to gain access.
Even though all my Win/8 work and stuff will be on my 'VM-Win8', I'll occasionally boot native and keep the 'original' up-to-date so that if I have problems, I can boot it 'native' and eliminate any accusations that the problem is related instead to CentOS or VMware, etc.
You seem to have things covered. VMware is pretty good, though I much prefer Virtual Box for its no nonsense simplicity. Once you have tried it, Ahh, well, You might agree. With virtualization, it is always best to get as much memory as possible. I saw a laptop with an AMD 4 core processor and 4 gig of ram at Walmart for about $548. All I can say is "Ham Sandwich", no bologna here. Now if only I could add raid to my laptop????
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.