You are not logged in.

#26 2024-05-08 13:57:37

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

grub, distro logo, login screen, checks for forever and brings me back on login screen, as if pw was wrong despite it being the right one

You first and foremost want to check whetehr you can mount or fsck theupsized partition

Online

#27 2024-05-08 14:50:55

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Meaning adding it to the fstab file? fsck has to be done from the corrupted distro or can be done from the gparted iso ?

Offline

#28 2024-05-08 15:28:16

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Meaning you boot the sysytem into the multi-user or rescue target or boot the install iso or grml.
The you try to mount the partition "mount /dev/sdX8 /mnt/wherever" and see whether that gets you an error.
If yes see whether you can "fsck /dev/sdX8" and whether this can sanitize the partition and whetehr you can then mount it.

Online

#29 2024-05-08 16:23:34

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

rewrote the clone2 from gparted live iso, and right after this, still from the iso
# fdisk /dev/sdc
d8
n8
+208 666 616
Do you want to remove ext4 signature ? n
w
# partprobe
# fsck /dev/sdc8
Superblock has an invalid journal (inode 8).
Clear<y>? y
*** journal has been deleted ***
Superblock has_journal is clear, but a journal is present.
Clear<y>? y
Pass 1: Checking inodes, blocks, and sizes
Journal inode is not in use, but contains data. Clear<y>? y
Inode 1 441 793 seems to contain garbage. Clear<y>? y
'a' to say yes to all
/dev/sdc8: 60/bunch of files (13.3% non-contiguous), 424730/ 26 083 327 blocks

# partprobe
# mount /dev/sdc8 /mnt/
# cd /mnt/ && ls -a
.   ..
So it sees nothing, right clicking on the desktop to open a file manager and going into /mnt only displays lost+found folder and a .directory file with a logo which is an exclamation sign within a triangle...

# umount /mnt/
# mount
# reboot (into clone2)
gets me grub, distro splash, login screen, endless bringback sad (however this time it instantly deny my password instead of taking time, I do can ensure the pw typed is the latest I defined tho. It could as old as being unique that I defined at install time, I don't remember changing it after install)

Last edited by archiedummy (2024-05-08 16:24:01)

Offline

#30 2024-05-08 20:35:19

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

https://man.archlinux.org/man/core/e2fs … xt4.8.en#b
https://man.archlinux.org/man/mke2fs.8.en#n

login screen, endless bringback

The bigger DEs won't start if they cannot open your $HOME

Inode 1 441 793 seems to contain garbage. Clear<y>? y
'a' to say yes to all

What exactly did you say here? Did you clear more than inode 1441793?

Online

#31 2024-05-15 10:51:16

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

What exactly did you say here? Did you clear more than inode 1441793?

Yes I pressed 'a' to clear every question (there was a bunch btw), I shouldn't have done it ?

Thanks for the docs, will read it and report actions I've done asap

Offline

#32 2024-05-15 13:22:00

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

rewrote the clone2 from gparted live iso, and right after this, still from the iso
# fdisk /dev/sdc
d8
n8
+208 666 616
Do you want to remove ext4 signature ? n
w
# partprobe
# mke2fs -cc -e continue -n -t ext4 -v /dev/sdc8
/dev/sdc8 contains a ext4 file system last mounted on /home March 26 2024
Proceed anyway? (y,N) y
Block size = 4096, Fragment size=4096, Stride=0 blocks, Stripe width=8191 blocks
6 520 832 inodes, 26 083 327 blocks
Maximum filesystem blocks=2 174 746 624
796 block groups, 32768 blocks per group, 32768 fragments per group
8192 inodes per group
UUID: 5d0...
Superblock backups stored on blocks: 32 768, 98 304, 163 840, 229 376, 294 912, 819 200, 884 736, 1 605 632, 2 654 208, 4 096 000, 7 962 624, 11 239 424, 20 480 000, 23 887 872

# e2fsck -cc -k -f -C 0 -tt -v /dev/sdc8
Superblock has an invalid journal (inode 8).
Clear<y>? y
*** journal has been deleted ***
Superblock has_journal is clear, but a journal is present.
Clear<y>? y
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: 100% done, ~40minutes elapsed. (didn't keep written how many errors among 0/0/0)
done. /dev/sdc8: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Journal inode is not in use, but contains data. Clear<y>? yes
Inode 1 441 793 seems to contain garbage. Clear<y<? no
Inode 1 441 793 seems to have inline data but extent flag is set. Fix<y>? yes
Inode 1 441 793 has INLINDE_DATA_FL flag on filesystem without inline data support. Clear<y>? no
Inode 1 441 793 is in use, but has dtime set. Fix<y>? yes
Inode 1 441 793 has imagic flag set. Clear<y>? no
Inode 1 441 793 has a extra size (6375) which is invalid. Fix<y>? yes
Error while iterating over blocks in inode 1 441 793: Cannot iterate data blocks of a inode containing inline data
/dev/sdc8: *** FILE SYSTEM WAS MODIFIED ***
/dev/sdc8: *** WARNING: Filesystem still has errors ***
Recreate journal<y>? yes
Creating journal (131 072 blocks): Done.
*** journal has been regenerated ***
e2fsck: aborted
*** filesystem still has errors ***

# partprobe
# mount /dev/sdc8 /mnt/
# cd /mnt/ && ls -a
.   .. .directory lost+found me
!!!! so I right click on desktop to open file manager in usermode, browse to /mnt/, properties of the me file : filetype inode/x-corrupted type size on disk 0 bytes sad

edit :
$ sudo umount /mnt/
$ sudo su
# mount
# e2fsck -p -f -C 0 -tt -v /dev/sdc8
Inode 1 441 793 seems to contains garbage. UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
# e2fsck -y -f -C 0 -tt -v /dev/sdc8
*** FILE SYSTEM WAS MODIFIED ***
0 bad blocks, 1 large file, 555 802 blocks used
# of inodes with ind/dind/tind blocks: 404/390/402
---
3 files

# partprobe
# mount /dev/sdc8 /mnt/
# cd /mnt/ && ls -a
.   .. .directory lost+found
no me folder sad

edit2: is there even a course on those things (inodes, superblocks, fragments, strides, stripes, sectors, blockgroups, journal) ? Has the author Tytso compiled explanations with drawings somewhere ? Or one just has to read the C code?

Last edited by archiedummy (2024-05-16 09:43:26)

Offline

#33 2024-05-15 21:48:37

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

I shouldn't have done it ?

It hid what else was addressed but would also explain why you end up w/ a virtually blank disk afterwards

# e2fsck -cc -k -f -C 0 -tt -v /dev/sdc8
Superblock has an invalid journal (inode 8).
Clear<y>? y

The plan here would have been to use one of the backup superblocks and see whether that produces better results.
https://wiki.archlinux.org/title/File_recovery#e2fsck

Also do not delete the journal, run fsck in ro mode and you can skip badblocks.
Eg.

e2fsck -f -tt -v -n -b 32768  /dev/sdc8

(This will NOT fix the filesystem b/c of the "-n" option, we're looking for a/the most usable superblock first)

Online

#34 2024-05-16 09:51:35

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

rewrote the clone2 from gparted live iso, and right after this, still from the iso
# fdisk /dev/sdc
d8
n8
+208 666 616
Do you want to remove ext4 signature ? n
w
# e2fsck -tt -v -f -n -b 32768  /dev/sdc8
Superblock has an invalid journal (inode 8). Clear? no
Journal superblock is corrupt. Fix? no
e2fsck: Cannot proceed with file system check

Same goes for badblocks : 98 304, 163 840, 229 376, 294 912

# e2fsck -tt -v -f -n -b 819200 /dev/sdc8
e2fsck: Bad magic number in super-block while trying to open /dev/sdc8
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock
/dev/sdc8 contains a ext4 file system

Same goes for blocks : 884 736, 1 605 632, 2 654 208, 4 096 000, 7 962 624, 11 239 424, 20 480 000, 23 887 872

So there isn't any superblock usable apparently sad

edit
(without fdisking beforehands) :
rewrote the clone2 from gparted live iso, and right after this, still from the iso
# mke2fs -e continue -n -t ext4 -v /dev/sdc8
Superblock backups stored on blocks: 32 768, 98 304, 163 840, 229 376, 294 912, 819 200, 884 736, 1 605 632, 2 654 208, 4 096 000, 7 962 624, 11 239 424, 20 480 000, 23 887 872
# e2fsck -tt -v -f -n -b 32768 /dev/sdc8
Group 304 block bitmap does not match checksum. IGNORED
...
Group 795 block bitmap does not match checksum. IGNORED
Pass 5: Memory used: 44180k/0k
/dev/sdc8: *** WARNING: Filesystem still has errors ***
---
218 293 files

Same goes for all of the superblocks, each time the same amount of files is retrieved.

# mount /dev/sdc8 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdc8, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call.
sad

edit 2 :
# fdisk /dev/sdc
d8
n8
default size
Created a new partition 8 of type 'Linux filesystem' and of size 1.5 TiB.
Do you want to remove ext4 signature ? n
w
# e2fsck -tt -v -f -n -b 32768  /dev/sdc8
Superblock has an invalid journal (inode 8). Clear? no
Journal superblock is corrupt. Fix? no
e2fsck: Cannot proceed with file system check

edit 3 :
# fdisk /dev/sdc
d8
n8
+208664576
Do you want to remove ext4 signature ? n
w
# e2fsck -tt -v -f -n -b 32768  /dev/sdc8
Superblock has an invalid journal (inode 8). Clear? no
Journal superblock is corrupt. Fix? no
e2fsck: Cannot proceed with file system check
sad

Last edited by archiedummy (2024-05-16 11:18:08)

Offline

#35 2024-05-16 13:19:28

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

From https://bbs.archlinux.org/viewtopic.php … 9#p2166509 testdisk actually found a partition/filesystem that was then also usable - I'd repeat that on the grown partition and at least recover the data from there as much as possible. Then have testdisk write the partition and try to fix stuff from there.

Online

#36 2024-05-17 22:46:36

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Yes I have backed up what the list option was finding on some drive. Since then I tried opening some folders from the backup, so far I didn't experience the disapointment of not finding a file I needed, but I do noticed there are bunch of garbage files in the folders, that weren't here before, I'm gonna have to tidy it up I guess.

Then have testdisk write the partition and try to fix stuff from there.

- Analyse, it does see the right disk partition layout,
- then Quick Search (I have to wait several hours in my case) https://www.cgsecurity.org/wiki/TestDis … partitions , it finds : EFI starts 2048 ends 534 527, MS Data starts 567 296 ends 438 628 344, MS Data (kinda duplicate) starts 567 303 438 628 351, Linux data starts 729 034 750 ends 937 701 365 weighs 208 666 616, Linux data starts 884 476 576 ends 884 488 975 weighs 12 400. (the real layout that it should find, for reference : https://i.imgur.com/m1O8O9C.jpeg )
- Trying 'p' to list files on the suspected home partition gives : "Can't open filesystem. Filesystem seems damaged."
- so 'q' to move one step back on the prompt
- 'enter' to proceed leads me to a list where there's ONLY one EFI partition sad I have either "write" or "deeper search" options.
- Deeper Search (several hours) (it warns me with crazy values that a swap partition starting at 523 644 920 and ending at 54 048 206 823 can't be recovered, as well as another swap starting at 782 525 816 and ending at 48 767 578 071, with some raid partition weighing  32 216 809 127 573 677 sectors. I have to press 'continue'.) : It lists a bunch of partitions and a bunch of duplicates/versions of each. Even some Mac HFS type, while I don't remember ever messing with macOS on that particular drive. (can it be that the brand new drive I bought is made out of some upcycled controller or something? Or that testdisk is retrieving data from the USB enclosure's controller, which does enclosed another drive messing with macOS/VMs not so long ago? anyway, not a question relevant to this thread..)
- So using this https://bbs.archlinux.org/viewtopic.php … 3#p2166553 previous sector table I try to find matching partitions among the duplicates, that start and end accordingly, but i can't find a match (even close enough) for sdc2 16MiB microsoft resrved partition (that has exclamation sign on gparted GUI listing). Then I 'right arrow' from deleted to primary, some 208GiB MS Data partition that can list some files which namings aren't garbage, starts 567 296, ends 438 628 344. Then I find the one labeled WinRE_DRV in gparted GUI, starts 438 628 352, ends 440 676 344, weighs 999MiB. Then I spot an intelligible sdc6(root) weighing 41 GB, starts 441 724 928, ends 523 644 927. Digging, I notice that the 2nd big-no-no EFI you spotted (weighing "525 MB / 504 MiB") has label vendor and contains files related to Waydroid...anyways let's skip. I come across some right (36 GiB) linux swap, but listing files it says "Support for this filesystem hasn't been implemented" (,as I can recreate it later down the road anyway I guess). Finally to find home/sdc8, I go through like THOUSANDS (i wish there was some scroll to very bottom shortcut) of : list file ('p') -> "no file found, filesystem may be damaged" -> 'q' for previous -> down arrow, etc. until I end up finding a suitable one (one with a 'me' folder that contains some files!
- note that I don't have the logical option as in https://www.cgsecurity.org/wiki/TestDis … per_Search , it's either P=Primary or D=Deleted, so all the ones I kept were assigned primary.
- 'enter' to proceed. List contains 5 primaries : EFI system, MS data, MS data labelled WinRE_DRV, and two Linux filesys. data partitions. I press 'write', 'y' to confirm the writing of the partition table.
- "You'll have to reboot to take effect" -> ok -> quit -> quit -> I unplug the gparted live stick, and boot on the m.2 clone2 still plugged.

# reboot
grub screen smile, distro splashscreen smile, black screen..., mouse pointer appears, pam login page with my username, I type pw, accepted it seems (KDE splashscreen), blackscreen,..for like 10 minutes sad (tried to move trackpad in case it was dimming screen, it's not that, unfortunately)
I don't know if it landed anywhere, as I believe my wallpaper was full black screen as long as didn't go multihead (custom detection script). I do hear crazy fan noise/cpu activity at times, I don't reboot it, just in case it's doing heavy recovery in the background as a miracle, but I don't have much hope.
edit : some 10 hours later, got back to it and it was in suspend mode, upon waking up through power button, I still got a black screen instead of the login page sad

So I learned how to restore using testdisk but it seems it's a loss ? Should I redo all that with a fresh clone2 ? (This one was still messed up from all the previous fdisks/e2fsck/regrowing attempts)

edit 2 : did the same manual selection of the partitions, on a freshly recloned clone2 drive, the ending is the same, pw accepted, KDE splashscreen, then blackscreen. sad it's been black for like 15minutes so far, so I guess i'm out of luck.
Can it be that I have to dig further among the thousands of duplicates ? (after I found a suitable/not-empty home partition, there were still thousands more after that, I just couldn't find another one that isn't empty so I went with that 1st one that I found, but maybe some other version exist beyond this one?)

Last edited by archiedummy (2024-05-18 14:20:18)

Offline

#37 2024-05-18 15:30:00

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

pw accepted, KDE splashscreen, then blackscreen

Can you log in on the console?
Do you have a system journal from a crashing KDE login?

This isn't necesarily related to your partitioning problems anymore.

Online

#38 2024-05-18 18:02:18

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Good news then,

Can you log in on the console?

I don't know how, according to this https://userbase.kde.org/Troubleshooting/Black_Screen , I managed to ctrl+alt+f1 during the lenghty distro splashscreen and got to see some logs, mainly, "a start job is running for /dev/disk/by-uuid/... (53s / 1min30)". However then the login screen took over, and upon typing my pw, I land on blackscreen, where ctrl+alt+f1 doesn't work and ctrl+t neither sad

edit : neither does ctrl+alt+f2

edit2 : giving 10 more gigs to home using gparted live iso doesn't solve the problem

edit 3 : dummy me, it was ctrl+alt+fn+f3 on laptop to get to tty2, source https://discuss.kde.org/t/black-screen- … lasma/9638

$ journalctl --user-unit=plasma-plasmashell.service --boot 0 --no-pager
-- No entries --

$ systemctl --user restart plasma-plasmashell.service
Failed to restart plasma-plasmashell.service: Unit plasma-plasmashell.service not found.
$ sudo systemctl --user restart plasma-plasmashell.service
Failed to connect to bus: No such file or directory

edit 4 :
$ startx
now gives me the mouse pointer, but still on a black screen sad
(nvidia mx150 in there)

Last edited by archiedummy (2024-05-18 18:52:16)

Offline

#39 2024-05-18 21:13:10

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

edit 3 : dummy me, it was ctrl+alt+fn+f3 on laptop to get to tty2

If you can switch away from the failing gnome session, please post your complete system journal for the boot from the console

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Online

#40 2024-05-19 00:17:45

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Not even needed apparently....as I MANAGED TO REACH MY DESKTOP smile smile smile smile smile Tho i'm not sure what I did to get there : this https://userbase.kde.org/Troubleshooting/Black_Screen gave me a hint to update nvidia drivers/libraries (even though I swear I never messed up with gpu drivers after install and multihead setup years ago, the only thing I was messing up with right before the accident, was setting up android studio for emulation). After the update I rebooted and it was still a black screen, but fans were spinning crazy so I let the machine do whatever work, and I forgot to toggle off my hardware button for accessing the internet, so I can't tell if/what it was fetching. Once I read your post I rebooted thinking the logs would be fresher, but it got me on my desktop somehow !! smile

You and cgsecurity really are GOATED thank you so much <3 I flag this thread as [SOLVED] but tbh I didn't do anything yet on my rescued desktop, will still update the thread if anything is buggy/missing

Offline

#41 2024-05-19 16:11:32

archiedummy
Member
Registered: 2024-03-26
Posts: 23

Re: [SOLVED] Can't boot after shrinking root (/) to expand /home

Dummy me!! The black screen after logging in was actually caused by my custom script disabling the laptop lid and deporting everything on the multihead, while I was only juicing the charging part of the dock but not any external monitor !! There was no need to mess up with optimus in my case actually

Offline

Board footer

Powered by FluxBB