You are not logged in.

#1 2020-10-15 22:46:37

ziltoid
Member
Registered: 2020-10-15
Posts: 26

[SOLVED] Windows 10 disappeared after installing Arch. Need advice

Hello everyone.

As title says, my win10 disappeared from the grub menu and from the motherboard's bios/uefi menu after installing Arch and I'm looking for advice to try to save the win installation (and don't ruin the Arch install too). Arch is working and I'm writing from it.
My pc have 3 storage devices: one SSD with win10, one HDD for data and one nvme with Arch, previously with Ubuntu 20.04. This is the output of sudo fdisk -l:

Disk /dev/nvme0n1: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: KINGSTON SA2000M8250G                   
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: gpt

Device             Start       End   Sectors  Size Type
/dev/nvme0n1p1      2048   2099199   2097152    1G EFI System
/dev/nvme0n1p2   2099200 106956799 104857600   50G Linux filesystem
/dev/nvme0n1p3 106956800 480249855 373293056  178G Linux filesystem
/dev/nvme0n1p4 480249856 488397134   8147279  3.9G Linux swap


Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 850 
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: gpt

Device         Start       End   Sectors   Size Type
/dev/sda1       2048     34815     32768    16M Microsoft reserved
/dev/sda2      34816 487342947 487308132 232.4G Microsoft basic data
/dev/sda3  487344128 488392703   1048576   512M Windows recovery environment


Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD1003FZEX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sdb1  *         2048  592828415  592826368 282.7G  7 HPFS/NTFS/exFAT
/dev/sdb2       695228416 1953519615 1258291200   600G  7 HPFS/NTFS/exFAT

Following the guide at Detecting other operating systems I did:

1. installed both os-prober and ntfs-3g
2. mounted /dev/sda2 on /mnt
3. run os-probe
4. updated the grub config with "sudo grub-mkconfig -o /boot/grub/grub.cfg"

but nothing changed.

Any help is greatly appreciated. Thank you.

EDIT: update formatting

Last edited by ziltoid (2020-10-17 07:52:49)

Offline

#2 2020-10-15 22:53:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

Please use code tags to format your posts - it makes things much easier to read.

What is the contents of /boot/grub/grub.cfg?

Offline

#3 2020-10-16 07:59:49

ziltoid
Member
Registered: 2020-10-15
Posts: 26

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

This is the content of /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="${saved_entry}"
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_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
else
  search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
fi
    font="/usr/share/grub/unicode.pf2"
fi

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

### BEGIN /etc/grub.d/06_grub-customizer_menu_color_helper ###
### END /etc/grub.d/06_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-74849db5-f411-4feb-b591-4f10b403f2c7' {
        savedefault
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
        else
          search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
        fi
        echo    'Loading Linux linux-lts ...'
        linux   /boot/vmlinuz-linux-lts root=UUID=74849db5-f411-4feb-b591-4f10b403f2c7 rw  loglevel=3 quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-ucode.img /boot/initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-74849db5-f411-4feb-b591-4f10b403f2c7' {
        menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-74849db5-f411-4feb-b591-4f10b403f2c7' {
        savedefault
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
                else
                  search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
                fi
                echo    'Loading Linux linux-lts ...'
                linux   /boot/vmlinuz-linux-lts root=UUID=74849db5-f411-4feb-b591-4f10b403f2c7 rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-ucode.img /boot/initramfs-linux-lts.img
        }
        menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-74849db5-f411-4feb-b591-4f10b403f2c7' {
        savedefault
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
                else
                  search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
                fi
                echo    'Loading Linux linux-lts ...'
                linux   /boot/vmlinuz-linux-lts root=UUID=74849db5-f411-4feb-b591-4f10b403f2c7 rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux-lts-fallback.img
        }
        menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-74849db5-f411-4feb-b591-4f10b403f2c7' {
        savedefault
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
                else
                  search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=74849db5-f411-4feb-b591-4f10b403f2c7 rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-ucode.img /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-74849db5-f411-4feb-b591-4f10b403f2c7' {
        savedefault
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  74849db5-f411-4feb-b591-4f10b403f2c7
                else
                  search --no-floppy --fs-uuid --set=root 74849db5-f411-4feb-b591-4f10b403f2c7
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=74849db5-f411-4feb-b591-4f10b403f2c7 rw  loglevel=3 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 ###

Offline

#4 2020-10-16 08:43:32

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

If that was an uefi windows installation, did you delete anything from the efi system partition on the nvme?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2020-10-16 09:44:26

ziltoid
Member
Registered: 2020-10-15
Posts: 26

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

progandy wrote:

If that was an uefi windows installation, did you delete anything from the efi system partition on the nvme?

Yes, I wanted to change partitions size so I erased all partitions in the nvme, sure to not harming the windows installation because it was in a different drive. But now I see the probable big mistake. Is it fixable?

Offline

#6 2020-10-16 09:51:27

solskog
Member
Registered: 2020-09-05
Posts: 407

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

With win10 installation media usb/cd you can create a new efi partition and copy windows bootloader files into this partition.
https://www.diskpart.com/windows-10/win … -5740.html
Efter you successful recover bootloader files, recreate boot entry in grub.cfg.
https://wiki.archlinux.org/index.php/GR … I/GPT_mode

Last edited by solskog (2020-10-16 09:58:36)

Offline

#7 2020-10-16 09:54:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,426

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

Explictly creating a new one might lead to other issues depending on your mainboard, if you've already gone and accommodated that much space for the ESP just share it with Windows.

Online

#8 2020-10-16 10:00:25

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

V1del wrote:

Explictly creating a new one might lead to other issues depending on your mainboard, if you've already gone and accommodated that much space for the ESP just share it with Windows.

The windows install disk should have a way to mount the existing efi partition in the commandline (Shift-F10 o so) and run e.g. bcdedit to restore the boot files.
Edit: http://woshub.com/how-to-repair-uefi-bo … ws-8/#h2_3

It should also have an automatic startup repair, but I don't know how well that works in this situation or if it destroys your linux installation.

Last edited by progandy (2020-10-16 10:08:54)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2020-10-16 10:01:55

solskog
Member
Registered: 2020-09-05
Posts: 407

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

V1del wrote:

if you've already gone and accommodated that much space for the ESP just share it with Windows.

Yes, I agree. OP could just crate and copy win10 bootloader files into the old EFI and remove the new created EFI.

Offline

#10 2020-10-17 07:46:18

ziltoid
Member
Registered: 2020-10-15
Posts: 26

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

Good news smile
I was able to recover the windows partition following the commands present here https://www.diskpart.com/windows-10/win … -5740.html.
Not every command worked and if I remember correctly what did the trick was Bootrec /fixmbr and then use the repair utility of the windows10 usb install. After that os-prober found the w10 partition.

Thanks everyone for the timely help.

Few questions:
1. How should I have installed Arch preserving the win10 boot, completely removing Ubuntu and resizing the partitions?
2. Os-prober takes a lot of time to find the win partition. I can see it if I use Grub Customizer. Is it normal?

Offline

#11 2020-10-17 09:22:48

solskog
Member
Registered: 2020-09-05
Posts: 407

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

I actually keep windows ESP and arch ESP in separate disk/partitions. I use rEFInd to detect/manage bootloader files and manually select which system I would like to boot from time to time. But as @V1del noticed before, this might leads to other issues deppends on what mainboard/bios you are using.

Offline

#12 2020-10-17 10:14:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,426

Re: [SOLVED] Windows 10 disappeared after installing Arch. Need advice

For the follow up questions

1)  Keep the existing EFI partition, just remove the GRUB folder from Ubuntu and don't touch the Microsoft folder on the ESP,  if you really wanted to resize the ESP, just remove the other partitions and resize the ESP on it's own without directly deleting it, but what you also could do is just leave the ESP size as is and then use GRUB/Refind to install the Arch boot loader and then not mount the ESP to /boot and keep the kernel images out of the ESP (... GRUB or refind are able to load kernel images from linux partitions so you need very little actual space on the ESP - GRUB needs 133KB here)

2) I have seen some reports of that, afaik it might be because it waits on some LVM function before giving up and actually continuing on with normal probing, it is fairly quick here, but that might be because I've masked lvm2-lvmetad.socket and lvm2-lvmetad.service due to similar probing delays in the past. If you don't actively use LVM this should be safe.

Online

Board footer

Powered by FluxBB