Linux boot文件损坏

本文最后更新于:2021-04-05

人作死,就会死

本来只是想加一块硬盘,但是关机之前 pacman -Syu,而且不小心强制关机,以及不清楚操作了什么,boot文件似乎坏掉了…

2020/07/29 更新
前两天设置BIOS的时候,发现有点问题
F10无法保存BIOS更改,按一下界面就冻住了,只能强制关机
开机再进BIOS,又回到原来的设置
网上说是主板上的电池没电,今天买了个CMOS用的纽扣电池,换上去还真好了
祸不单行

开机进入grub命令行

开机直接进入一个

1
grub >    

这样的命令行
上面有一块文字 “grub2 is …”
还提示 Tab 列出所有命令

一脸懵,超出我的技术水平了….

尝试修理

查一下,英文的找了几篇,没找到比较好用的,可能是关键词不对
中文找到一个 zhihu - manjaro+win10双系统修复grub的艰辛过程
照着试试

ls (hd0,msdos1)/ 还能看到根目录下的文件,主目录的文件也都在
放了一半心,至少数据都在

看起来只是grub坏了,按照教程试着修复

  • 第一种方法不成功,最后输入normal没有反应,输入boot提示需要指定核心之类的,去网上找教程,指定一下参数还是启动不了
  • 第二种方法也不成功,报教程里说的 error: cannot find a device for /boot (is /dev mounted?). 错误,教程给出的方法不管用
    去网上找,Trying to reinstall GRUB 2, cannot find a device for /boot (is /dev mounted?) 额外挂载了sys``dev``proc目录,但还是不能安装grub,又有其他错误(但是我忘记是什么错误提示了,没有记下来

弃疗

总之,尝试了一晚上加半个上午,菜鸡放弃修复grub,重装系统了事
(主力电脑不能开机,笔记本又是新系统,翻墙软件都还没装,拿bing查资料修grub,太难了,后面想办法给笔记本上了梯子
((本来想写一写详细的失败过程,但是拖延症发作,写的时候发现细节差不多忘光了


2020/08/03 更新

突然找到一个文件,自己都忘记了
当时用live manjaro尝试修理的时候,把命令行输出全部复制下来了,虽然不知道有没有用
贴上来,说不定以后就能发现是哪里出问题了
(应该不是什么难题吧,可是我现在太菜了,不会修

参考的两个教程

Trying to reinstall GRUB 2, cannot find a device for /boot (is /dev mounted?)
grub-install: error: cannot find EFI directory. (Reinstalling Grub Boot Loader Windows 10/Kali Linux Dual Boot with Dual Hard Drive)

bash shell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
 [manjaro@manjaro ~]$ manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
--> mount: [/mnt/mnt/Avalon/]
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# ls /home/mori/
Avalon Documents Music Pictures Softwares Videos gdindex.js goindex.js package-lock.json
Desktop Downloads Penguin Public Templates dependencies.md go my_anime_list.md 'to buy.md'
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# ls /boot/grub/
fonts grub.cfg grubenv themes x86_64-efi
[root@manjaro /]# ls /boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
[root@manjaro /]# mount /dev/nvme0n1p2 /mnt
[root@manjaro /]# mount /dev/nvme0n1p1 /mnt
[root@manjaro /]# cd /mnt
[root@manjaro mnt]# ls
EFI
[root@manjaro mnt]# chroot /mnt
chroot: failed to run command '/bin/sh': No such file or directory
[root@manjaro mnt]# chr
chroot chrt
[root@manjaro mnt]# chroot /mnt
chroot: failed to run command '/bin/sh': No such file or directory
[root@manjaro mnt]# ls /bin/sh
/bin/sh
[root@manjaro mnt]# chroot --help
Usage: chroot [OPTION] NEWROOT [COMMAND [ARG]...]
or: chroot OPTION
Run COMMAND with root directory set to NEWROOT.

--groups=G_LIST specify supplementary groups as g1,g2,..,gN
--userspec=USER:GROUP specify user and group (ID or name) to use
--skip-chdir do not change working directory to '/'
--help display this help and exit
--version output version information and exit

If no command is given, run '"$SHELL" -i' (default: '/bin/sh -i').

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>
Full documentation <https://www.gnu.org/software/coreutils/chroot>
or available locally via: info '(coreutils) chroot invocation'
[root@manjaro mnt]# [wd
bash: [wd: command not found
[root@manjaro mnt]# pwd
/mnt
[root@manjaro mnt]# ls
EFI
[root@manjaro mnt]# sudo chroot /mnt
chroot: failed to run command '/bin/bash': No such file or directory
[root@manjaro mnt]# ls /bin/*sh
/bin/alsa-info.sh /bin/ceph-crash /bin/lav2avi.sh /bin/ppmflash /bin/toolstash
/bin/alsabat-test.sh /bin/chsh /bin/lavtc.sh /bin/rescan-scsi-bus.sh /bin/uim-sh
/bin/anytovcd.sh /bin/clash /bin/ldns-nsec3-hash /bin/rsh /bin/unix-lpr.sh
/bin/avahi-publish /bin/cpufreq-bench_plot.sh /bin/lprsetup.sh /bin/sh /bin/virsh
/bin/bash /bin/findssl.sh /bin/mbedtls_crypt_and_hash /bin/slsh /bin/winpr-hash
/bin/bssh /bin/gettext.sh /bin/mbedtls_udp_proxy_wrapper.sh /bin/spirv-lesspipe.sh /bin/wiper.sh
/bin/c_rehash /bin/gvmap.sh /bin/nettle-hash /bin/ssh /bin/zsh
/bin/capsh /bin/jemalloc.sh /bin/pax11publish /bin/tclsh
[root@manjaro mnt]# ls /bin/bash
/bin/bash
[root@manjaro mnt]# ls -al /bin/bash
-rwxr-xr-x 1 root root 928016 Jul 11 00:57 /bin/bash
[root@manjaro mnt]# ls
EFI
[root@manjaro mnt]# tail /var/log/pacman.log
[2020-07-22T19:40:45+0800] [ALPM-SCRIPTLET] -> at next boot.
[2020-07-22T19:40:45+0800] [ALPM-SCRIPTLET]
[2020-07-22T19:40:45+0800] [ALPM-SCRIPTLET]
[2020-07-22T19:40:45+0800] [ALPM] running 'texinfo-install.hook'...
[2020-07-22T19:40:45+0800] [ALPM] running 'thunderbird-post.hook'...
[2020-07-22T19:40:45+0800] [ALPM] running 'update-ca-trust.hook'...
[2020-07-22T19:40:46+0800] [ALPM] running 'update-desktop-database.hook'...
[2020-07-22T19:40:46+0800] [ALPM] running 'update-mime-database.hook'...
[2020-07-22T19:40:46+0800] [ALPM] running 'update-vlc-plugin-cache.hook'...
[2020-07-22T19:40:47+0800] [ALPM] running 'xorg-mkfontscale.hook'...
[root@manjaro mnt]# ls -lh /var/log/pacman.log
-rw-r--r-- 1 root root 406K Jul 22 19:40 /var/log/pacman.log
[root@manjaro mnt]# vi /var/log/pacman.log
[root@manjaro mnt]# cat /var/log/pacman.log | grep -i bash
[2020-03-02T11:39:34+0800] [ALPM] upgraded bashrc-manjaro (5.0.011-2 -> 5.0.016-1)
[2020-03-02T11:39:34+0800] [ALPM] upgraded bash (5.0.011-2 -> 5.0.016-1)
[2020-03-02T11:39:39+0800] [ALPM] upgraded bash-completion (2.9-1 -> 2.10-1)
[2020-06-08T21:15:40+0800] [ALPM] upgraded bashrc-manjaro (5.0.016-1 -> 5.0.017-1)
[2020-06-08T21:15:40+0800] [ALPM] upgraded bash (5.0.016-1 -> 5.0.017-1)
[2020-06-08T21:15:43+0800] [ALPM] upgraded bash-completion (2.10-1 -> 2.10-2)
[2020-07-22T19:39:17+0800] [ALPM] upgraded bashrc-manjaro (5.0.017-1 -> 5.0.018-1)
[2020-07-22T19:39:17+0800] [ALPM] upgraded bash (5.0.017-1 -> 5.0.018-1)
[root@manjaro mnt]# cd /
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# fsck
fsck from util-linux 2.35.2
e2fsck 1.45.6 (20-Mar-2020)
/dev/nvme0n1p2 is mounted.
e2fsck: Cannot continue, aborting.


[root@manjaro /]# umount /dev/nvme0np1
umount: /dev/nvme0np1: no mount point specified.
[root@manjaro /]# pwd
/
[root@manjaro /]# mount
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda1 on /root type ext4 (rw,relatime)
/dev/sdb1 on /mnt/Penguin type ext4 (rw,relatime,stripe=8191)
/dev/sdc2 on /mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro /]# umount
umount umount.ecryptfs umount.ecryptfs_private umount.nfs umount.nfs4 umount.udisks2
[root@manjaro /]# umount /dev/nvme0n1p1
[root@manjaro /]# umount /dev/nvme0n1p2
[root@manjaro /]# mount
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda1 on /root type ext4 (rw,relatime)
/dev/sdb1 on /mnt/Penguin type ext4 (rw,relatime,stripe=8191)
/dev/sdc2 on /mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
[root@manjaro /]# fsck
fsck from util-linux 2.35.2
e2fsck 1.45.6 (20-Mar-2020)
/dev/nvme0n1p2 is mounted.
e2fsck: Cannot continue, aborting.


[root@manjaro /]# cd
[root@manjaro ~]# ls
Desktop Documents Downloads Music Pictures Public Templates Videos lost+found timeshift
[root@manjaro ~]# pwd
/root
[root@manjaro ~]# ls Videos/
[root@manjaro ~]# ll
bash: ll: command not found
[root@manjaro ~]# ls -;
ls: cannot access '-': No such file or directory
[root@manjaro ~]# ls -l
total 52
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Desktop
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Documents
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Downloads
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Music
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Pictures
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Public
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Templates
drwxr-xr-x 2 root root 4096 Mar 3 22:14 Videos
drwx------ 2 root root 16384 Mar 3 09:46 lost+found
drwxr-xr-x 9 root root 4096 Jul 22 14:03 timeshift
[root@manjaro ~]# manjaro-chroor --help
bash: manjaro-chroor: command not found
[root@manjaro ~]# exit
--> umount: [/mnt/mnt/Avalon/]
--> umount: [/mnt/mnt/Penguin]
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
--> umount: [/mnt]
[manjaro@manjaro ~]$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdd1 on /run/miso/bootmnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=default)
cowspace on /run/miso/cowspace type tmpfs (rw,relatime,size=262144k,mode=755)
overlay_root on /run/miso/overlay_root type tmpfs (rw,relatime,size=37024496k,mode=755)
/dev/loop0 on /run/miso/sfs/livefs type squashfs (ro,relatime)
/dev/loop1 on /run/miso/sfs/mhwdfs type squashfs (ro,relatime)
/dev/loop2 on /run/miso/sfs/desktopfs type squashfs (ro,relatime)
/dev/loop3 on /run/miso/sfs/rootfs type squashfs (ro,relatime)
overlay on / type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=2428)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/nvme0n1p2 on /run/media/manjaro/798f587b-983a-478e-aca8-60524844eaa2 type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)
[manjaro@manjaro ~]$ umount /dev/nvme0n1p1
umount: /dev/nvme0n1p1: must be superuser to unmount.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p1
umount: /dev/nvme0n1p1: not mounted.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
[manjaro@manjaro ~]$ fsck /dev/nvme0n1p2
fsck from util-linux 2.35.1
e2fsck 1.45.6 (20-Mar-2020)
fsck.ext2: Permission denied while trying to open /dev/nvme0n1p2
You must have r/w access to the filesystem or be root
[manjaro@manjaro ~]$ cd /dev/nvme0n1p2
bash: cd: /dev/nvme0n1p2: Not a directory
[manjaro@manjaro ~]$ fsck --help

Usage:
fsck [options] -- [fs-options] [<filesystem> ...]

Check and repair a Linux filesystem.

Options:
-A check all filesystems
-C [<fd>] display progress bar; file descriptor is for GUIs
-l lock the device to guarantee exclusive access
-M do not check mounted filesystems
-N do not execute, just show what would be done
-P check filesystems in parallel, including root
-R skip root filesystem; useful only with '-A'
-r [<fd>] report statistics for each device checked;
file descriptor is for GUIs
-s serialize the checking operations
-T do not show the title on startup
-t <type> specify filesystem types to be checked;
<type> is allowed to be a comma-separated list
-V explain what is being done

-?, --help display this help
--version display version

See the specific fsck.* commands for available fs-options.
For more details see fsck(8).
[manjaro@manjaro ~]$ sudo fsck /dev/nvme0n1p2
fsck from util-linux 2.35.1
e2fsck 1.45.6 (20-Mar-2020)
/dev/nvme0n1p2: clean, 724071/31244288 files, 93382485/124949570 blocks
[manjaro@manjaro ~]$ sudo fsck /dev/nvme0n1p1
fsck from util-linux 2.35.1
fsck.fat 4.1 (2017-01-24)
/dev/nvme0n1p1: 6 files, 70/76646 clusters
[manjaro@manjaro ~]$ sudo fsck /dev/nvme0n1p1
fsck from util-linux 2.35.1
fsck.fat 4.1 (2017-01-24)
/dev/nvme0n1p1: 6 files, 70/76646 clusters
[manjaro@manjaro ~]$ sudo fsck /dev/nvme0n1p2
fsck from util-linux 2.35.1
e2fsck 1.45.6 (20-Mar-2020)
/dev/nvme0n1p2: clean, 724071/31244288 files, 93382485/124949570 blocks
[manjaro@manjaro ~]$ man fsck
[manjaro@manjaro ~]$ manjaro-chroot
==> ERROR: Can't create chroot on non-directory
[manjaro@manjaro ~]$ manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
--> mount: [/mnt/mnt/Avalon/]
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# ^C
[root@manjaro /]# exit
--> umount: [/mnt/mnt/Avalon/]
--> umount: [/mnt/mnt/Penguin]
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
--> umount: [/mnt]
[manjaro@manjaro ~]$ sudo manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
--> mount: [/mnt/mnt/Avalon/]
[root@manjaro /]# mount /dev/nvme0n1p
nvme0n1p1 nvme0n1p2
[root@manjaro /]# mount /dev/nvme0n1p2 /mnt
[root@manjaro /]# mount /dev/nvme0n1p1^Cmnt
[root@manjaro /]# ls /mnt/
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# mount /dev/nvme0n1p1 /mnt/boot
[root@manjaro /]# cd /mnt/
[root@manjaro mnt]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro mnt]# chroot /mnt
sh-5.0# grub-install /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
sh-5.0# exit
exit
[root@manjaro mnt]# mount | tail -l
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro mnt]# chroot /mnt
sh-5.0# sudo grub-install --root-directory=/mnt/boot /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /mnt/boot/boot/grub (is /dev mounted?).
sh-5.0# sudo grub-install --root-directory=/sys^Cdev/nvme0n1p1
sh-5.0# ls /sys/
sh-5.0# sudo grub-install --root-directory=/sys /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /sys/boot/grub (is /dev mounted?).
sh-5.0# ls /mnt/
Avalon Penguin boot timeshift
sh-5.0# exit
exit
[root@manjaro mnt]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro mnt]# pwd
/mnt
[root@manjaro mnt]# ls boot/
EFI grub
[root@manjaro mnt]# chroot /mnt
sh-5.0# grub-install /dev/nvme0n1p1/
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
sh-5.0# umount /dev/nvme0n1p1
umount: /dev/nvme0n1p1: umount failed: No such file or directory.
sh-5.0# ls /dev/
null
sh-5.0# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
sh-5.0# ls /home/
blkid.md mori tele
sh-5.0# ls /mnt/
Avalon Penguin boot timeshift
sh-5.0# ls /mnt/boot/
boot
sh-5.0# ls /mnt/boot/boot/
grub
sh-5.0# ls /mnt/boot/boot/grub/
fonts grubenv i386-pc themes
sh-5.0# exit
exit
[root@manjaro mnt]# mount | tail -l
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro mnt]# pwd
/mnt
[root@manjaro mnt]# exit
--> umount: [/mnt/mnt/Avalon/]
--> umount: [/mnt/mnt/Penguin]
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
--> umount: [/mnt]
umount: /mnt/mnt/Avalon: no mount point specified.
umount: /mnt/mnt/Penguin: no mount point specified.
umount: /mnt: target is busy.
[manjaro@manjaro ~]$ mount | tail -l
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/sdb1 on /mnt/mnt/Penguin type ext4 (rw,relatime,stripe=8191)
/dev/sdc2 on /mnt/mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/nvme0n1p2 on /mnt/mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt/mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[manjaro@manjaro ~]$ umount /dev/nvme0n1p1
umount: /mnt/mnt/boot: must be superuser to unmount.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p1
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
[manjaro@manjaro ~]$ mount | tail -;
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/sdb1 on /mnt/mnt/Penguin type ext4 (rw,relatime,stripe=8191)
/dev/sdc2 on /mnt/mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
[manjaro@manjaro ~]$ sudo manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
mount: /mnt/mnt/Penguin: /dev/sdb1 already mounted on /mnt/mnt/Penguin.
--> mount: [/mnt/mnt/Avalon/]
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
[root@manjaro /]# exit
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
[manjaro@manjaro ~]$ ls /mnt/
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[manjaro@manjaro ~]$ ls /mnt/mnt/
Avalon boot Penguin timeshift
[manjaro@manjaro ~]$ mount | tail -;
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/sdb1 on /mnt/mnt/Penguin type ext4 (rw,relatime,stripe=8191)
/dev/sdc2 on /mnt/mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
[manjaro@manjaro ~]$ umount /dev/sdb1
umount: /mnt/mnt/Penguin: must be superuser to unmount.
[manjaro@manjaro ~]$ sudo umount /dev/sdb1
[manjaro@manjaro ~]$ sudo umount /dev/sdc2
[manjaro@manjaro ~]$ umount /dev/sdb1
umount: /dev/sdb1: must be superuser to unmount.
[manjaro@manjaro ~]$ mount | tail -;
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
[manjaro@manjaro ~]$ mount | tail -;
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
[manjaro@manjaro ~]$ mount | tail -;
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=4936596k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
[manjaro@manjaro ~]$ sudo manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
--> mount: [/mnt/mnt/Avalon/]
[root@manjaro /]# mount | tail -l
/dev/sdc2 on /mnt/Avalon type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
[root@manjaro /]# mount /dev/nvme0n1p2 /^C
[root@manjaro /]# ls /mnt/
Avalon Penguin boot timeshift
[root@manjaro /]# ls /mnt/boot/
boot
[root@manjaro /]# ls /mnt/boot/boot/
grub
[root@manjaro /]# ls -l /mnt/boot/boot/
total 4
drwxr-xr-x 5 root root 4096 Jul 23 00:39 grub
[root@manjaro /]# mount /dev/nvme0n1p
nvme0n1p1 nvme0n1p2
[root@manjaro /]# mount /dev/nvme0n1p2 /mnt
[root@manjaro /]# ls /mnt/boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
[root@manjaro /]# mount /dev/nvme0n1p1 /mnt/boot
[root@manjaro /]# ls /mnt/boot/
EFI grub
[root@manjaro /]# cd /mnt/
[root@manjaro mnt]# chroot /mnt
sh-5.0# exit
exit
[root@manjaro mnt]# mount | tail -l
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro mnt]# chroot /mnt
sh-5.0# grub-install /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
sh-5.0# grub-install --root/directory=/mnt/boot /dev/nvme0n1p1
grub-install: unrecognized option '--root/directory=/mnt/boot'
Try 'grub-install --help' or 'grub-install --usage' for more information.
sh-5.0# grub-install --root-directory=/mnt/boot /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /mnt/boot/boot/grub (is /dev mounted?).
sh-5.0# grub-install --root-directory=/mnt /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /mnt/boot/grub (is /dev mounted?).
sh-5.0# umount /dev/nvme0n1p1
umount: /dev/nvme0n1p1: umount failed: No such file or directory.
sh-5.0# exit
exit
[root@manjaro mnt]# umount /dev/nvme0n1p1
[root@manjaro mnt]# chroot /mnt
sh-5.0# ls /mnt/
Avalon Penguin boot timeshift
sh-5.0# exit
exit
[root@manjaro mnt]# ls /mnt
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro mnt]# ls /mnt/boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
[root@manjaro mnt]# chroot /mnt
sh-5.0# grub-install /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
sh-5.0# exit
exit
[root@manjaro mnt]# mount /dev/nvme0n1p2 /mnt
mount: /mnt: /dev/nvme0n1p2 already mounted on /.
[root@manjaro mnt]# mount | tail -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
[root@manjaro mnt]# ls /
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro mnt]# mount /dev/nvme0n1p1 /mnt/boot/
[root@manjaro mnt]# chroot /mnt
sh-5.0# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
sh-5.0# ls boot/
EFI grub
sh-5.0# ls /dev/
null
sh-5.0# ls /mnt/
Avalon/ Penguin/ boot/ timeshift/
sh-5.0# ls mnt/boot/
boot grub
sh-5.0# ls mnt/boot/boot/
grub
sh-5.0# grub-install boot/
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
sh-5.0# ls boot/grub/
fonts grubenv i386-pc themes
sh-5.0# grub-install --root-directory=/mnt/mnt/boot boot/
Installing for i386-pc platform.
grub-install: error: cannot find a device for /mnt/mnt/boot/boot/grub (is /dev mounted?).
sh-5.0# grub-install --root-directory=/mnt/mnt/ boot/
Installing for i386-pc platform.
grub-install: error: cannot find a device for /mnt/mnt/boot/grub (is /dev mounted?).
sh-5.0# exit
exit
[root@manjaro mnt]# mount --bind /dev/nvme0n1p1 /mnt/boot/
mount: /mnt/boot: mount(2) system call failed: Not a directory.
[root@manjaro mnt]# exit
--> umount: [/mnt/mnt/Avalon/]
--> umount: [/mnt/mnt/Penguin]
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
--> umount: [/mnt]
umount: /mnt/mnt/Avalon: no mount point specified.
umount: /mnt/mnt/Penguin: no mount point specified.
umount: /mnt: target is busy.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p1
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
[manjaro@manjaro ~]$ sudo umount /dev/scb1
umount: /dev/scb1: no mount point specified.
[manjaro@manjaro ~]$ sudo umount /dev/sdc2
[manjaro@manjaro ~]$ sudo umount /dev/sdb1
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
[manjaro@manjaro ~]$ manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
--> mount: [/mnt/mnt/Avalon/]
[root@manjaro /]# ls /mnt/
Avalon Penguin boot mnt timeshift
[root@manjaro /]# ls /mnt/mnt/
boot
[root@manjaro /]# ls /mnt/mnt/boot/
boot grub
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# mount --bind /dev/nvme0n1p2 /mnt
mount: /mnt: mount(2) system call failed: Not a directory.
[root@manjaro /]# ls /mnt/
Avalon Penguin boot mnt timeshift
[root@manjaro /]# mount --bind /dev/nvme0n1p2 /mnt/
mount: /mnt: mount(2) system call failed: Not a directory.
[root@manjaro /]# mount /dev/nvme0n1p2 /mnt/
[root@manjaro /]# ls /dev/
autofs dri hidraw3 loop0 nvme0 rtc sg1 tty11 tty23 tty35 tty47 tty59 udmabuf vcsa vcsu6
block drm_dp_aux0 hidraw4 loop1 nvme0n1 rtc0 sg2 tty12 tty24 tty36 tty48 tty6 uhid vcsa1 vfio
bsg drm_dp_aux1 hpet loop2 nvme0n1p1 sda sg3 tty13 tty25 tty37 tty49 tty60 uinput vcsa2 vga_arbiter
btrfs-control drm_dp_aux2 hugepages loop3 nvme0n1p2 sda1 shm tty14 tty26 tty38 tty5 tty61 urandom vcsa3 vhci
bus fb0 hwrng loop4 nvram sdb snapshot tty15 tty27 tty39 tty50 tty62 usb vcsa4 vhost-net
char fd initctl loop5 parport0 sdb1 snd tty16 tty28 tty4 tty51 tty63 userio vcsa5 vhost-vsock
console full input loop6 port sdc stderr tty17 tty29 tty40 tty52 tty7 vcs vcsa6 zero
core fuse kfd loop7 ppp sdc1 stdin tty18 tty3 tty41 tty53 tty8 vcs1 vcsu zfs
cpu gpiochip0 kmsg mapper psaux sdc2 stdout tty19 tty30 tty42 tty54 tty9 vcs2 vcsu1
cpu_dma_latency gpiochip1 kvm mem ptmx sdd tty tty2 tty31 tty43 tty55 ttyS0 vcs3 vcsu2
cuse hidraw0 lightnvm mqueue pts sdd1 tty0 tty20 tty32 tty44 tty56 ttyS1 vcs4 vcsu3
disk hidraw1 log net random sdd2 tty1 tty21 tty33 tty45 tty57 ttyS2 vcs5 vcsu4
dma_heap hidraw2 loop-control null rfkill sg0 tty10 tty22 tty34 tty46 tty58 ttyS3 vcs6 vcsu5
[root@manjaro /]# mount --rbind /dev /mnt/dev
[root@manjaro /]# mount --rbind /proc /mnt/proc
[root@manjaro /]# mount --rbind /sys /mnt/sys
[root@manjaro /]# chroot /mnt/
sh-5.0# ls /dev/
autofs dri hidraw3 loop0 nvme0 rtc sg1 tty11 tty23 tty35 tty47 tty59 udmabuf vcsa vcsu6
block drm_dp_aux0 hidraw4 loop1 nvme0n1 rtc0 sg2 tty12 tty24 tty36 tty48 tty6 uhid vcsa1 vfio
bsg drm_dp_aux1 hpet loop2 nvme0n1p1 sda sg3 tty13 tty25 tty37 tty49 tty60 uinput vcsa2 vga_arbiter
btrfs-control drm_dp_aux2 hugepages loop3 nvme0n1p2 sda1 shm tty14 tty26 tty38 tty5 tty61 urandom vcsa3 vhci
bus fb0 hwrng loop4 nvram sdb snapshot tty15 tty27 tty39 tty50 tty62 usb vcsa4 vhost-net
char fd initctl loop5 parport0 sdb1 snd tty16 tty28 tty4 tty51 tty63 userio vcsa5 vhost-vsock
console full input loop6 port sdc stderr tty17 tty29 tty40 tty52 tty7 vcs vcsa6 zero
core fuse kfd loop7 ppp sdc1 stdin tty18 tty3 tty41 tty53 tty8 vcs1 vcsu zfs
cpu gpiochip0 kmsg mapper psaux sdc2 stdout tty19 tty30 tty42 tty54 tty9 vcs2 vcsu1
cpu_dma_latency gpiochip1 kvm mem ptmx sdd tty tty2 tty31 tty43 tty55 ttyS0 vcs3 vcsu2
cuse hidraw0 lightnvm mqueue pts sdd1 tty0 tty20 tty32 tty44 tty56 ttyS1 vcs4 vcsu3
disk hidraw1 log net random sdd2 tty1 tty21 tty33 tty45 tty57 ttyS2 vcs5 vcsu4
dma_heap hidraw2 loop-control null rfkill sg0 tty10 tty22 tty34 tty46 tty58 ttyS3 vcs6 vcsu5
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
sh-5.0# mount /dev/nvme0n1p
nvme0n1p1 nvme0n1p2
sh-5.0# mount /dev/nvme0n1p1 /^C
sh-5.0# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
sh-5.0# ls /dev/nvme0n1p1
/dev/nvme0n1p1
sh-5.0# ls /dev/nvme0n1p1/
ls: cannot access '/dev/nvme0n1p1/': Not a directory
sh-5.0# mount /dev/nvme0n1p1 ^C
sh-5.0# ls boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
sh-5.0# mount /dev/nvme0n1p1/ /
mount: /: special device /dev/nvme0n1p1/ does not exist (a path prefix is not a directory).
sh-5.0# mount /dev/nvme0n1p1 /
sh-5.0# ls boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p1 on / type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
sh-5.0# ls /
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
sh-5.0# ls boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
sh-5.0# ls mnt/
Avalon Penguin boot mnt timeshift
sh-5.0# ls mnt/boot/
boot grub
sh-5.0# ls mnt/boot/boot/
grub
sh-5.0# ls mnt/mnt/
boot
sh-5.0# ls mnt/mnt/boot/
boot grub
sh-5.0# grub-install /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# ls /boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
sh-5.0# mount /dev/nvme0n1p1 /boot
sh-5.0# ls /boot/
EFI grub
sh-5.0# grub-install /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# exit
exit
[root@manjaro /]# mount | tail -l
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
udev on /mnt/dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /mnt/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /mnt/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /mnt/proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /mnt/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /mnt/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro /]# umount /dev/nvme0n1p2
umount: /dev/nvme0n1p2: umount failed: Invalid argument.
[root@manjaro /]# mount | tail -l
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
udev on /mnt/dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /mnt/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /mnt/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /mnt/proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /mnt/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /mnt/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
[root@manjaro /]# umount /dev/nvme0n1p1
umount: /mnt/boot: no mount point specified.
[root@manjaro /]# umount /dev/nvme0n1p2
umount: /dev/nvme0n1p2: umount failed: Invalid argument.
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# ls boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
[root@manjaro /]# ls mnt/
EFI grub
[root@manjaro /]# exit
--> umount: [/mnt/mnt/Avalon/]
--> umount: [/mnt/mnt/Penguin]
--> umount: [/mnt/root]
--> umount: [/mnt/boot/efi]
--> umount: [/mnt]
umount: /mnt/mnt/Avalon: no mount point specified.
umount: /mnt/mnt/Penguin: no mount point specified.
umount: /mnt: target is busy.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p2
umount: /dev/nvme0n1p2: umount failed: Invalid argument.
[manjaro@manjaro ~]$ sudo umount /dev/nvme0n1p1
umount: /mnt/mnt/boot: no mount point specified.
[manjaro@manjaro ~]$ sudo umount /dev/sdb1
umount: /mnt/mnt/Penguin: no mount point specified.
[manjaro@manjaro ~]$ sudo umount /dev/sdc2
umount: /mnt/mnt/Avalon: no mount point specified.
[manjaro@manjaro ~]$ ls /mnt/mnt/
EFI grub
[manjaro@manjaro ~]$ manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
--> mount: [/mnt]
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/root]
--> mount: [/mnt/mnt/Penguin]
mount: /mnt/mnt/Penguin: mount point does not exist.
--> mount: [/mnt/mnt/Avalon/]
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
[root@manjaro /]# ls
bin desktopfs-pkgs.txt etc lib lost+found none proc rootfs-pkgs.txt sbin srv tmp var
boot dev home lib64 mnt opt root run snap sys usr
[root@manjaro /]# ls boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
[root@manjaro /]# ls /mnt/
EFI grub
[root@manjaro /]# mount | tail -l
/dev/sda1 on /root type ext4 (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
[root@manjaro /]# ls /mnt/
EFI grub
[root@manjaro /]# chroot /mnt
chroot: failed to run command '/bin/sh': No such file or directory
[root@manjaro /]# mount /dev/nvme0n1p2 /mnt
[root@manjaro /]# mount /dev/nvme0n1p1 /mnt/boot/
[root@manjaro /]# mount --rbind /dev /mnt/dev
[root@manjaro /]# mount --rbind /proc /mnt/proc
[root@manjaro /]# mount --rbind /sys /mnt/sys
[root@manjaro /]# chroot /mnt
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
sh-5.0# ls /boot/
EFI grub
sh-5.0# grub-install /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# grub-install --root-direcotry=/mnt/mnt/boot/ /dev/nvme0n1p1
grub-install: unrecognized option '--root-direcotry=/mnt/mnt/boot/'
Try 'grub-install --help' or 'grub-install --usage' for more information.
sh-5.0# grub-install --root-directory=/mnt/mnt/boot/ /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# mount /dev/nvme0n1p1 /boot
mount: /boot: /dev/nvme0n1p1 already mounted on /boot.
sh-5.0# mount /dev/nvme0n1p1 /boot/
mount: /boot: /dev/nvme0n1p1 already mounted on /boot.
sh-5.0# ls /boot/
EFI grub
sh-5.0# exit
exit
[root@manjaro /]# mount | tail -l
tmp on /tmp type tmpfs (rw,nosuid,nodev)
overlay on /etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)
/dev/nvme0n1p2 on /mnt type ext4 (rw,relatime)
/dev/nvme0n1p1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
udev on /mnt/dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /mnt/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /mnt/dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /mnt/proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /mnt/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /mnt/sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
[root@manjaro /]# chroot /mnt
sh-5.0# grub-install --root-directory=/mnt/boot/ /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# grub-install --root-directory=/mnt/boot /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# ls /boot/
EFI grub
sh-5.0# mount /dev/nvme0n1p1 /boot/efi
sh-5.0# ls boot/
EFI grub
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p1 on /boot/EFI type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
sh-5.0# grub-install /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# grub-install --root-directory=/mnt/boot/efi /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# grub-install --root-directory=/mnt/boot/EFI /dev/nvme0n1p1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# umount /dev/nvme0n1p1
sh-5.0# ls /boot/
EFI grub
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
sh-5.0# umount /dev/nvme0n1p1
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
sh-5.0# ls /boot/
amd-ucode.img efi grub initramfs-5.4-x86_64-fallback.img initramfs-5.4-x86_64.img linux54-x86_64.kver memtest86+ vmlinuz-5.4-x86_64
sh-5.0# ls /boot/efi/
sh-5.0# mount /dev/nvme0n1p
nvme0n1p1 nvme0n1p2
sh-5.0# mount /dev/nvme0n1p1 /boot/efi
sh-5.0# mount | tail -l
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=24624776k,nr_inodes=6156194,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
sh-5.0# grub-install /dev/nvme0n1p1
Installing for x86_64-efi platform.
Installation finished. No error reported.
sh-5.0#

本博客所有文章除特别声明外,均采用 CC BY-NC-ND 4.0协议 。转载请注明出处~