You are not logged in.

#1 2015-01-26 12:43:27

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

[Solved] Linux do not boots after using ExtFS for Windows

I have installed two OS on my laptop: ArchLinux and Windows 10. Yesterday I boot in Windows and I needed to connect my external HDD, which uses ext file system. So I downloaded and installed ExtFS for Windows (Paragon) and set it to autostart.
All was fine, my external HDD and all my internal partitions were able to mount. After I ended work in Windows, I wanted to boot in Linux.

But it is not loadable anymore. After I choose ArchLinux in grub menu it stops loading with such message (it is on Russian, so maybe in English it looks a bit different):

Loading Linux Linux...
error: invalid cluster 0.
Loading initial virtual disk
alloc magic is broken at 0x91a6fdc0: 91b0b720
Aborted. Press any key to exit.

Windows is still able to load and I can see my files in Ext partitions. So I of course can grab them to external HDD and reinstall ArchLinux, but I do not want that.

Please, give me any suggestions on how to (or is it possible) to resolve this problem?
I have already tryed to boot in Windows, then unmount all partitions, mounted by ExtFS for Windows, and then try booting in Linux. Also I tryed to hard reset while in Windows and then trying to boot Linux. Nothing helped.

Last edited by agent0 (2015-02-04 21:47:38)

Offline

#2 2015-01-26 13:19:00

Awebb
Member
Registered: 2010-05-06
Posts: 5,266

Re: [Solved] Linux do not boots after using ExtFS for Windows

Live CD + fsck.

Offline

#3 2015-01-26 14:04:42

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Could you please say what exactly command should I run?
I tryed loading from LiveUSB, then run fsck.ext4 /dev/sda1, fsck.ext4 /dev/sda2, fsck.ext4 /dev/sda5. Everywhere it was written "clean". Then I tryed to boot ArchLinux, but the same problem.

I have the following partition scheme:
sda1 - /           8300
sda2 - /home 8300
sda3 - efi sys ef00
sda4 - swap    8200
sda5 - /var       8300
sda6 - windows reserved
sda7 - windows 10

Offline

#4 2015-01-27 05:30:21

MSC
Member
Registered: 2014-07-13
Posts: 33

Re: [Solved] Linux do not boots after using ExtFS for Windows

Try reinstalling the linux package and/or re-running grub-mkconfig.

Offline

#5 2015-01-27 10:15:59

pgoetz
Member
From: Austin, Texas
Registered: 2014-02-21
Posts: 276

Re: [Solved] Linux do not boots after using ExtFS for Windows

How do you know that agent0 is using grub?  I didn't see this in the problem description.  Although I haven't used it for any dual boot systems, maybe an UEFI-based solution (e.g. gummiboot) might avoid problems like this in the future, since there is no need for the OS to mess with your boot partition.

Offline

#6 2015-01-27 16:18:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,491
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#7 2015-02-04 15:38:07

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

For now, I am really using grub.
I tryed to reconfig grub. My actions were: mount all needed partitions (and also /dev/sda3 to /mnt/boot), swaped on /dev/sda4 and chrooted to /mnt. Of cource, I mounted /dev/sda1 to /mnt. Then I run and got the following:

grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-probe: error: cannot find a device for / (is /dev mounted?).

Then I tryed to lsblk, but got

lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory

I also tryed to generate grub config (the same command as above) without entering chroot and I got:
Generating grub configuration file . . .
Found memtest 86+ image: /boot/memtest64+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type dm-0
done

But after that my grub menu was broken.

Then I tryed to install grub again (under chroot this time) and got
grub-install --target=x86-64-efi --efi-directory=/boot --bootloader-id=ark --recheck
grub-install: error: /usr/lib/grub/x86-64-efi/modinfo.sh doesn't exist. Please specify --target or --directory

Then I tryed without --target:
grub-install --efi-directory=/boot --bootloader-id=ark --recheck
Installing for i386-pc platform
grub-install: error: install device isn't specified


What can help me? Windows is still normal booting. I can try to use another bootloader, but does bootloader cause?

Offline

#8 2015-02-04 16:03:28

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,917
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

When installing GRUB you need to specify the target drive (after mounting the partitions and chrooting):

# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ark --recheck /dev/sda

The wiki appears to be missing this -- I will correct it later unless someone tells me I am wrong about this (I only use GRUB with non-EFI systems).*

If you still have problems, I would recommend using gummiboot instead -- this program is the reason why Arch mounts the EFI system partition to /boot (rather than /boot/efi) and it really is much easier to use than GRUB.
https://wiki.archlinux.org/index.php/Be … therboards

* EDIT: I am wrong about this -- I saw the note explaining why this is not needed just after I edited the wiki page; how embarrassing...
https://wiki.archlinux.org/index.php/Gr … allation_2

Last edited by Head_on_a_Stick (2015-02-04 18:45:54)

Offline

#9 2015-02-04 16:54:47

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Head_on_a_Stick, thanks for reply.
I have also noticed, that I accidently used dash ("-") instead of underline ("_") in target.
But now, I run  grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ark --recheck /dev/sda
and got the following output:

Installing for x86_64-efi platform
grub-install: error: cannot find a device for /boot (is /dev mounted?).

I suspect, that something is wrong with my filesystem on /dev/sda3? Maybe ExtFS corrupted or crypted it?

Or am I mounting all correctly? lsblk (under chroot) gives lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
Before chrooting I mounted all partitions with the following:

# mount /dev/sda1 /mnt
# mount /dev/sda2 /mnt/home
# mount /dev/sda3 /mnt/boot
# swapon /dev/sda4
# mount /dev/sda5 /mnt/var
# chroot /mnt /bin/bash

Offline

#10 2015-02-04 17:12:19

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Now, I was trying to install gummiboot. wifi-menu was not working under chroot, so I exited it to LiveUSB and connected to wifi from there, then I entered chroot again. Packages dosfstools and efibootmgr were already installed and I desided not to reinstall them. But when I was installing gummiboot itself, I got:

[root@archiso /]# pacman -S gummiboot
resolving dependencies. . .
looking for conflicting packages. . .

Packages (1) gummiboot-45-1

Total Download Size: 0.05 MiB
Total Installed Size:    0.48 MiB

:: Proceed with installation? [Y/n] (I choosed Y)
error: could not open file: /etc/mtab: No such file or directory
error: could not determine filesystem mount points
error: failed to commit transaction (unexpected error)
Errors occured, no packages were upgraded.
[root@archiso /]#

What I think strange is that Why under chroot prompt still shows that host is called "archiso"? As I understand, there should be my Arch's host name. And by the way, if I ls /etc/mtab, it EXISTS there. Why pacman do not see it?

Last edited by agent0 (2015-02-04 17:19:54)

Offline

#11 2015-02-04 17:37:55

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,917
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

agent0 wrote:
# chroot /mnt /bin/bash

That's your problem right there.

If you're just using the `chroot` command, you need to mount /proc, /sys & /dev as well.
https://wiki.archlinux.org/index.php/Ch … ing_chroot

You should use the arch-chroot script (this performs all these actions for you):

# arch-chroot /mnt /bin/bash

https://wiki.archlinux.org/index.php/Be … ase_system

Offline

#12 2015-02-04 18:21:04

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Oh, my fault. Thanks for suggestion. Now with arch-chroot /mnt /bin/bash I installed gummiboot and it said:

Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/gummiboot/gummibootx64.efi.
Skipping /boot/EFI/Boot/BOOTX64.EFI, since it's owned by another boot loader.
:: Run '/usr/bin/gummiboot install' to make gummiboot your default bootloader

Then I did

# gummiboot --path=/boot install
Created /boot/loader.
Created /boot/loader/entries.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/gummiboot/gummibootx64.efi.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/Boot/BOOTX64.EFI.
Created EFI boot entry "Linux Boot Manager".

Then I made arch.conf and loader.conf as described in beginner's guide. Then I exited arch-chroot, umounted -R /mnt and rebooted.
My LiveUSB was inserted and I saw some strange EFI menu (like on LiveUSB) and I choosed Linux Boot Manager. But I got error saying that boot partition is broken. It returned me back to that EFI menu. Then I choosed Windows Boot Manager and it was booted normally. I shuted it down, removed LiveUSB and power on laptop. And for my surprise, I saw corrupted GRUB. Very strange, I thought, that I made gummiboot as default bootloader.
After that I pressed ctrl alt del and entered to UEFI's native boot manager and I saw that gummiboot's entry was disappeared (I also inserted and checked if it may be installed it's entry to LiveUSB, but no, on LiveUSB is only EFI USB Device (JetFlashTranscend 8GB) entry). My old grub's and Windows Boot Manager entries are still there in UEFI native menu.

So, it is apparently that it is something wrong with filesystem.
Maybe I should mkfs on some (/dev/sda3?) partition or whatever should I do?

Last edited by agent0 (2015-02-04 21:59:52)

Offline

#13 2015-02-04 18:51:51

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

From LiveUSB I did fsck.vfat /dev/sda3. Do not know, maybe I need fsck.msdos or something another here. It is esp, so as I remember, I made it with type ef00 in gdisk

# fsck.vfat /dev/sda3
fsck.fat 3.0.27 (2014-11-12)
/vmlinuz-linux
  Contains a free cluster (20). Assuming EOF.
/vmlinuz-linux
  File size is 4064608 bytes, cluster chain length is 0 bytes.
  Truncating file to 0 bytes.
/loader
  Contains a free cluster (42). Assuming EOF.
/grub/grub.cfg
  Contains a free cluster (20). Assuming EOF.
/grub/grub.cfg
  File size is 2930 bytes, cluster chain length is 0 bytes.
  Truncating file to 0 bytes.
/EFI/gummiboot
  Contains a free cluster (21). Assuming EOF.
/EFI/Boot/BOOTX64.EFI
  Contains a free cluster (66). Assuming EOF.
/EFI/Boot/BOOTX64.EFI
  File size is 78619 bytes, cluster chain length is 0 bytes.
  Truncating file to 0 bytes.
Reclaimed 887 unused clusters (3633152 bytes).
Free cluster summary wrong (114785 vs. really 116078)
1) Correct
2) Don't correct
?

I pressed ctrl + C, because I do not know what to choose and did I used needed version of fsck.

Offline

#14 2015-02-04 18:55:16

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,917
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

This is getting really confusing...

Try going to the "native boot manager" (firmware boot options) and look for an option to boot the "UEFI OS" or something similar.

This will attempt to boot from the file at /boot/EFI/Boot/BOOTX64.EFI (which is the gummiboot bootmanager).

From the output of `fsck` it looks like your /boot partition is damaged.

Offline

#15 2015-02-04 19:19:53

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Shit. I found a forum bug. All my text was gone after I wanted to Quote you. Need to post it to bug tracker.

I answered 1 and also tryed to answer 2 at the command fsck /dev/sda3. Output is the same:

Leaving filesystem unchanged.
/dev/sda3: 517 files, 14734/130812 clusters

and exit status 1.

You said me to enter firmware's Boot Manager. It appears if pressing f12 while powering on. Also theese entries can be watched in UEFI Setup Utility (if press f2 while powering on) and there I can change their order. So as I understand, UEFI makes copy of first boot entry .efi file to /boot/EFI/Boot/BOOTX64.EFI and it becomes default.

But as I explained above, I can see there only two (or three with inserted LiveUSB) boot  entries which are:
arH_grub (SAMSUNG MZMTD256HAGM-000L1), Windows Boot Manager (SAMSUNG MZMTD256HAGM-000L1) and EFI USB Device (JetFlashTranscend 8GB).
arH_grub is first (default) and is my grub's entry. For now, grub loading is corrupted, but even when it worked, it couldn't load Linux.
Gummiboot's entry (called "Linux Boot Manager (...)") was disappeared.

Last edited by agent0 (2015-02-04 19:24:56)

Offline

#16 2015-02-04 20:06:41

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

Ok, now I think I should reformat my /dev/sda3 to vfat and after that reinstall linux package and bootloader.
But as described in ArchWiki:

Warning: If dual-booting with an existing installation of Windows on a UEFI/GPT system, do not re-format the UEFI partition. Doing so will destroy all existing data on that partition, including the Windows .efi file required to boot it.

So I think to be able to boot to Windows 10 again, I need to save somewhere files from </dev/sda3>/EFI/Microsoft/Boot/, and then restore it back, right? In that directory there are many language-named directories (such as ru-RU and so on), and also
BCD*, BCD.LOG*, BCD.LOG1*, BCD.LOG2*,  bootmgfw.efi*, bootmgr.efi*, BOOTSTAT.DAT*, boot.stl*, Fonts/, memtest.efi*, qps-ploc/, Resources/.
Each language folder and qps-ploc folder contains such files: bootmgfw.efi.mui*, bootmgr.efi.mui*, memtest.efi.mui*;
Fonts folder contains: chs_boot.ttf*, cht_boot.ttf*, jpn_boot,ttf*, kor_boot.ttf*, malgun_boot.ttf*, malgunn_boot.ttf*, meiryo_boot.ttf*, meirjon_boot.ttf*, msjh_boot.ttf*, msjhn_boot.ttf*, msyh_boot.ttf*, msyhn_boot.ttf*, segmono_boot.ttf*, segoen_slboot.ttf*, segoe_slboot.ttf*, wgl4_boot.ttf*;
Resources folder contains: bootres.dll and en-US folder, which contain bootres.dll.mui*.

Does Microsoft folder contains all I need or I need to copy </dev/sda3>/BOOTSECT.BAC*? All other stuff as I understand belongs to Linux and I think it is not needed to save.

Offline

#17 2015-02-04 20:21:43

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,917
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

I really don't know -- my Windows 10 system is on a non-EFI machine.

Offline

#18 2015-02-04 21:20:36

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

When I was trying to copy file </dev/sda3>/BOOTSECT.BAC* and use tab-completions I get errors:

[ numbers] FAT-fs (sda3): error, fat_get_cluster: invalid cluster chain (i_pos 0)

The same line three times, but with different numbers in suare brackets. But I copied files from Microsoft directory and file BOOTSECT.BAC to another external USB flash.

I unmounted all from /mnt. Then mkfs.vfat -F32 /dev/sda3 gived mkfs.fat 3.0.27 (2014-11-12).
Then I mounted all partitions to where they should go in /mnt and swaped on /dev/sda3.
Then I genfstab to /mnt/etc/fstab (deleted old lines from there), then arch-chroot to /mnt.
There I did pacman -S linux (reinstalling), pacman -S gummiboot (reinstalling), then gummiboot --path=/boot install gived

Created /boot/EFI.
Created /boot/EFI/gummiboot.
Created /boot/EFI/Boot.
Created /boot/loader.
Created /boot/loader/entries.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/gummiboot/gummibootx64.efi.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/Boot/BOOTX64.EFI.
Created EFI boot entry "Linux Boot Manager".

Then I made arch.conf and loader.conf as described in beginner's guide. Exit chroot, unmounted all from /mnt and rebooted.

After that I was booted in menu that looks like EFI menu on intallation USB flash. There were three entries:
Arch Linux, EFI Default Loader and Reboot Into Firmware Interface.
I choosed Arch Linux. And OH YES! I loaded into my Arch smile))
Now, I need to restore my Windows Boot Loader files.

Offline

#19 2015-02-04 21:44:06

agent0
Member
From: Russia
Registered: 2014-05-04
Posts: 74
Website

Re: [Solved] Linux do not boots after using ExtFS for Windows

In firmware's Boot Manager there are the following entries:
Linux Boot Manager (SAMSUNG MZMTD256HAGM-000L1), EFI HDD Device (SAMSUNG MZMTD256HAGM-000L1) and EFI USB Device (JetFlashTranscend 8GB).
Now, I loaded from LiveUSB and when I inserted my another USB flash with Windows boot files, there was appeared in terminal:
[ numbers] sd 7:0:0:0: [sdc] No Caching mode page found
[ numbers] sd 7:0:0:0: [sdc] Assuming drive cache: write through
I did not uunderstand what was that, but I pressed enter and returned to prompt. Restored all files, that I copied (described above). Unmounted all that I mounted there and rebooted.
Then entered to fiirmware's Boot Manager and OH YEAH! Windows Boot Manager is there (it replaced EFI HDD Device entry). Also it appeared in gummiboot's loading menu. Windows loads normally.

Problem solved. But I do not want such advantures anymore.
I do not know how I now will use linux's filesystems like ext4 under Windows, but I think using ExtFS for Windows is bad idea. ExtFS is by the way free (but proprietary) software. Maybe solution is not to use Windows, but sometimes it is needed.

P.S. Forgot to say: I have deleted ExtFS for Windows before beginning recovering manipulations to prevent any problems. And after all is done, I will not install it anymore. If somebody has good solution to mount ext4 under Windows, please explain.

Last edited by agent0 (2015-02-04 21:46:30)

Offline

Board footer

Powered by FluxBB