LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   Remount windows 7 boot partition in arch linux (https://www.linuxquestions.org/questions/arch-29/remount-windows-7-boot-partition-in-arch-linux-4175602090/)

Julienc4545 03-18-2017 04:31 PM

Remount windows 7 boot partition in arch linux
 
Hey there,

I was installing arch linux onto my pc, besides windows 7,
as I accidentely unmounted the boot partition of windows. Does anyone have an idea how to remount and where to mount it? Allready tried "mount /dev/sda1 /mnt" but by booting windows it only keeps saying "Missing operating system". :(

Any help would be really great. Thanks in advance, Julien :)

syg00 03-18-2017 05:21 PM

Sounds like you removed it, not "unmounted" it.
Go to bootinfoscript and download the script - run it and post the RESULTS.txt as it says.
Looks like it is also in AUR if you have that enabled.

Julienc4545 03-19-2017 01:25 PM

RESULTS.txt
 
Sorry for taking so long. Hope it's anyhow possible to get windows back to work




Boot Info Script 0.75 [14 November 2016]


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

=> Grub2 (v2.00) 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 (,msdos3)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------

sda1: __________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Arch Linux
Boot files: /boot/grub/grub.cfg /etc/fstab
/boot/grub/i386-pc/core.img

sda4: __________________________________________________________________________

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

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

Drive: sda _____________________________________________________________________
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 771,971,071 771,764,224 7 NTFS / exFAT / HPFS
/dev/sda3 * 771,971,072 973,297,663 201,326,592 83 Linux
/dev/sda4 973,297,664 976,773,167 3,475,504 82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 bf260e0b-9853-4d58-b7e9-4f9060e5b2e3 ext4
/dev/sda2 4A76D09D76D08B59 ntfs
/dev/sda3 9fb735f8-9d4f-4610-aa39-5107ed82a212 ext4
/dev/sda4 c43a4d6c-0758-4c0a-b309-d7fbd22c5eab swap

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root 9 Mar 19 17:42 ata-HL-DT-ST_BD-RE_BH30N_M00AATK1935 -> ../../sr0
lrwxrwxrwx 1 root root 9 Mar 19 17:42 ata-WDC_WD5000AAKS-07V0A0_WD-WCAWFA834549 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 19 17:42 ata-WDC_WD5000AAKS-07V0A0_WD-WCAWFA834549-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 19 17:42 ata-WDC_WD5000AAKS-07V0A0_WD-WCAWFA834549-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 19 17:42 ata-WDC_WD5000AAKS-07V0A0_WD-WCAWFA834549-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 19 17:42 ata-WDC_WD5000AAKS-07V0A0_WD-WCAWFA834549-part4 -> ../../sda4
lrwxrwxrwx 1 root root 9 Mar 19 17:42 usb-Generic-_Compact_Flash_20060413092100000-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 9 Mar 19 17:42 usb-Generic-_MS_MS-Pro_20060413092100000-0:3 -> ../../sde
lrwxrwxrwx 1 root root 9 Mar 19 17:42 usb-Generic-_SD_MMC_20060413092100000-0:2 -> ../../sdd
lrwxrwxrwx 1 root root 9 Mar 19 17:42 usb-Generic-_SM_xD-Picture_20060413092100000-0:1 -> ../../sdc
lrwxrwxrwx 1 root root 9 Mar 19 17:42 wwn-0x50014ee158f72e4d -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 19 17:42 wwn-0x50014ee158f72e4d-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 19 17:42 wwn-0x50014ee158f72e4d-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 19 17:42 wwn-0x50014ee158f72e4d-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 19 17:42 wwn-0x50014ee158f72e4d-part4 -> ../../sda4

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

Device Mount_Point Type Options

/dev/sda3 / ext4 (rw,relatime,data=ordered)


=========================== sda3/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 9fb735f8-9d4f-4610-aa39-5107ed82a212
else
search --no-floppy --fs-uuid --set=root 9fb735f8-9d4f-4610-aa39-5107ed82a212
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9fb735f8-9d4f-4610-aa39-5107ed82a212' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 9fb735f8-9d4f-4610-aa39-5107ed82a212
else
search --no-floppy --fs-uuid --set=root 9fb735f8-9d4f-4610-aa39-5107ed82a212
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=9fb735f8-9d4f-4610-aa39-5107ed82a212 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9fb735f8-9d4f-4610-aa39-5107ed82a212' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9fb735f8-9d4f-4610-aa39-5107ed82a212' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 9fb735f8-9d4f-4610-aa39-5107ed82a212
else
search --no-floppy --fs-uuid --set=root 9fb735f8-9d4f-4610-aa39-5107ed82a212
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=9fb735f8-9d4f-4610-aa39-5107ed82a212 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-9fb735f8-9d4f-4610-aa39-5107ed82a212' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 9fb735f8-9d4f-4610-aa39-5107ed82a212
else
search --no-floppy --fs-uuid --set=root 9fb735f8-9d4f-4610-aa39-5107ed82a212
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=9fb735f8-9d4f-4610-aa39-5107ed82a212 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}

### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/30_os-prober ###
### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda3/etc/fstab: ================================

--------------------------------------------------------------------------------
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# UUID=9fb735f8-9d4f-4610-aa39-5107ed82a212
/dev/sda3 / ext4 rw,relatime,data=ordered 0 1

# UUID=c43a4d6c-0758-4c0a-b309-d7fbd22c5eab
/dev/sda4 none swap defaults 0 0

--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

408.393573761 = 438.509260800 boot/grub/grub.cfg 2
434.241645813 = 466.263416832 boot/grub/i386-pc/core.img 1
434.234111786 = 466.255327232 boot/vmlinuz-linux 1
368.695896149 = 395.884204032 boot/initramfs-linux-fallback.img 1
368.668598175 = 395.854893056 boot/initramfs-linux.img 1

========= Devices which don't seem to have a corresponding hard drive: =========

sdb sdc sdd sde

=============================== StdErr Messages: ===============================

mdadm: No arrays found in config file or automatically

syg00 03-20-2017 06:44 PM

You erased the M$oft "System Reserved" partition - what in Linux we'd called /boot.

Nothing else for it but to boot your Win7 CD and go through recovery - I found an article on technet when I needed to, so a quick search should find it for you. If you don't have a Win7 CD, it used to be you could download a recovery image and use that just for this sort of situation - not sure if that is still true.
Your data, and the Win7 system is still there, you are just missing the boot code.

Before you start, reformat /dev/sda1 as NTFS (after saving anything there), and remove the boot flag from /dev/sda3 - Windows boot-loaders won't boot with two boot flags, and I'd bet the recovery environment will be likewise.


All times are GMT -5. The time now is 06:35 AM.