Hello, it's been around 8 years since I used linux, I thought I could handle situations like these, but clearly not. My steps so far:
Can anyone help please?
Example log from windows's chkdsk - this seems to be before I shrunk it.
Full log of my attempts to setup grub:
The forum won't let me post the full Boot-Repair output so it's here, uploaded for a year which is the longest possible. https://paste.ubuntu.com/p/W4Fp74jPGx/
- I bought a used laptop, installed Win10 using the whole disk, then shrunk it within windows.
- if it matters, windows keeps coming up with issues in chkdsk, example log below in case there really is an issue with the drive.
- I then installed xubuntu. It failed to set grub up and continued booting straight to windows.
- I tried following these steps which seemed to work ok except for the "Bus error (core dumped)" - see full log of my attempts below. I did have some issues along the way (couldn't do some steps while gparted was open etc), please let me know if you think the details might matter and I will try to provide them.
- I then noticed that the bios boot order had windows before hard drive, changed it to "USB, hard drive, windows". I now get a plain black screen after the Lenovo logo disappears.
- Boot-Repair says it cannot do a repair because I need to be in a live session - but I definitely am in a live session? I just made an output for now.
Can anyone help please?
Example log from windows's chkdsk - this seems to be before I shrunk it.
Code:
chkdsk 20191026 122810.txtM
Type
Text
Size
4 KB (3,713 bytes)
Storage used
4 KB (3,713 bytes)
Location
My Drive
Owner
me
Modified
26 Oct 2019 by me
Opened
22:57 by me
Created
26 Oct 2019 with Google Drive Web
Add a description
Viewers can download
Level Date and Time Source Event ID Task Category
Information 26/10/2019 12:28:10 Microsoft-Windows-Wininit 1001 None "
Checking file system on C:
The type of the file system is NTFS.
One of your disks needs to be checked for consistency. You
may cancel the disk check, but it is strongly recommended
that you continue.
Windows will now check the disk.
Stage 1: Examining basic file system structure ...
The attribute of type 0x80 and instance tag 0xd in file 0x14d47
has allocated length of 0x7820000 instead of 0x77b0000.
Deleting corrupt attribute record (0x80, $J)
from file record segment 0x14D47.
Attribute record of type 0x80 and instance tag 0x4 is cross linked
starting at 0xe813 for possibly 0x1 clusters.
Some clusters occupied by attribute of type 0x80 and instance tag 0x4
in file 0x26395 is already in use.
Deleting corrupt attribute record (0x80, """")
from file record segment 0x26395.
Attribute record of type 0x80 and instance tag 0x4 is cross linked
starting at 0xe001 for possibly 0x1 clusters.
Some clusters occupied by attribute of type 0x80 and instance tag 0x4
in file 0x267a4 is already in use.
Deleting corrupt attribute record (0x80, """")
from file record segment 0x267A4.
160768 file records processed.
File verification completed.
3026 large file records processed.
0 bad file records processed.
Stage 2: Examining file name linkage ...
The sparse flag in standard information attribute in file 0x14d47
should not be set.
Correcting sparse file record segment 85319.
193 reparse records processed.
234020 index entries processed.
Index verification completed.
0 unindexed files scanned.
0 unindexed files recovered to lost and found.
193 reparse records processed.
The file attributes flag 0x6 in file 0x14d47 is incorrect.
The expected value is 0x206.
Fixing incorrect information in file record segment 14D47.
Inserting an index entry into index $I30 of file B.
Stage 3: Examining security descriptors ...
Cleaning up 13 unused index entries from index $SII of file 0x9.
Cleaning up 13 unused index entries from index $SDH of file 0x9.
Cleaning up 13 unused security descriptors.
Security descriptor verification completed.
Inserting data attribute into file 26395.
Inserting data attribute into file 267A4.
36629 data files processed.
CHKDSK is verifying Usn Journal...
Creating Usn Journal $J data stream
Usn Journal verification completed.
CHKDSK discovered free space marked as allocated in the
master file table (MFT) bitmap.
Correcting errors in the Volume Bitmap.
Windows has made corrections to the file system.
No further action is required.
311908351 KB total disk space.
20379092 KB in 119743 files.
91764 KB in 36628 indexes.
0 KB in bad sectors.
238047 KB in use by the system.
65536 KB occupied by the log file.
291199448 KB available on disk.
4096 bytes in each allocation unit.
77977087 total allocation units on disk.
72799862 allocation units available on disk.
Internal Info:
00 74 02 00 df 62 02 00 74 b9 04 00 00 00 00 00 .t...b..t.......
50 00 00 00 71 00 00 00 00 00 00 00 00 00 00 00 P...q...........
Windows has finished checking your disk.
Please wait while your computer restarts.
"
Code:
To run a command as administrator (user "root"), use "sudo <command>".See "man sudo_root" for details.
xubuntu@xubuntu:~$ sudo mount /dev/sda5 /mnt
xubuntu@xubuntu:~$ sudo mkdir /mnt/b
bin/ boot/
xubuntu@xubuntu:~$ sudo mkdir /mnt/boot/
System.map-5.3.0-18-generic memtest86+.bin
config-5.3.0-18-generic memtest86+.elf
efi/ memtest86+_multiboot.bin
grub/ vmlinuz
initrd.img vmlinuz-5.3.0-18-generic
initrd.img.old vmlinuz.old
xubuntu@xubuntu:~$ sudo mkdir /mnt/boot/efi/
mkdir: cannot create directory ‘/mnt/boot/efi/’: File exists
xubuntu@xubuntu:~$ sudo mkdir /mnt/boot/efi
mkdir: cannot create directory ‘/mnt/boot/efi’: File exists
xubuntu@xubuntu:~$ sudo mount /dev/sda2 /mnt/boot/efi
xubuntu@xubuntu:~$ for i in /dev /dev/pts /proc /sys; do sudo mkdir $i /mnt$i; done
mkdir: cannot create directory ‘/dev’: File exists
mkdir: cannot create directory ‘/mnt/dev’: File exists
mkdir: cannot create directory ‘/dev/pts’: File exists
mkdir: cannot create directory ‘/mnt/dev/pts’: File exists
mkdir: cannot create directory ‘/proc’: File exists
mkdir: cannot create directory ‘/mnt/proc’: File exists
mkdir: cannot create directory ‘/sys’: File exists
mkdir: cannot create directory ‘/mnt/sys’: File exists
xubuntu@xubuntu:~$ for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
xubuntu@xubuntu:~$ sudo modprobe efivars
xubuntu@xubuntu:~$ sudo apt-get install --reinstall grub-efi-amd64-signed
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
efibootmgr grub-efi-amd64-bin
The following NEW packages will be installed:
efibootmgr grub-efi-amd64-bin grub-efi-amd64-signed
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1196 kB of archives.
After this operation, 13.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 cdrom://Xubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017) eoan/main amd64 efibootmgr amd64 15-1 [28.2 kB]
Get:2 cdrom://Xubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017) eoan/main amd64 grub-efi-amd64-bin amd64 2.04-1ubuntu12 [701 kB]
Get:3 cdrom://Xubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017) eoan/main amd64 grub-efi-amd64-signed amd64 1.128+2.04-1ubuntu12 [467 kB]
Selecting previously unselected package efibootmgr.
(Reading database ... 162179 files and directories currently installed.)
Preparing to unpack .../efibootmgr_15-1_amd64.deb ...
Unpacking efibootmgr (15-1) ...
Selecting previously unselected package grub-efi-amd64-bin.
Preparing to unpack .../grub-efi-amd64-bin_2.04-1ubuntu12_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.04-1ubuntu12) ...
Selecting previously unselected package grub-efi-amd64-signed.
Preparing to unpack .../grub-efi-amd64-signed_1.128+2.04-1ubuntu12_amd64.deb ...
Unpacking grub-efi-amd64-signed (1.128+2.04-1ubuntu12) ...
Setting up efibootmgr (15-1) ...
Setting up grub-efi-amd64-bin (2.04-1ubuntu12) ...
Setting up grub-efi-amd64-signed (1.128+2.04-1ubuntu12) ...
Processing triggers for man-db (2.8.7-3) ...
xubuntu@xubuntu:~$ sudo grub-install --no-nvram --root-directory=/mnt
Installing for x86_64-efi platform.
Installation finished. No error reported.
xubuntu@xubuntu:~$ sudo chroot /mnt
root@xubuntu:/# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-18-generic
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
Bus error (core dumped)
done
root@xubuntu:/#