hello.
i have the problem that my computer gets stuck during boot. when i turn it on, it asks me for my firmware password which i enter, and it starts booting. so far so normal. but at some point it stops booting and i find myself looking at a prompt that says (initramfs).
when booting from an external HD i can run disks which tells me “disk is ok, 40 bad sectors”.
the internal HD (the one with the problem) has AFAIK 23.10 on it and the external one (which i am using now) has 24.04
so what can i do? can i repair this disk? can i get my files back?
Moved to the Support and Help category.
Have you tried to mount the problem disk to your 24.04 external boot session? You can try this from the gui or from command line. Command line would be better for these issues if you know how to do that…
It is more important to first see if you can access the drive to backup your files vs. trying to get that 23.10 disk to boot, or attempting other disk utilities. BTW, 23.10 support stopped July 2024.
in the disks utility i can mount the 2.1GB partition which contains some system files, AFAICT. the files i want to recover are on the 999GB partition which i can’t access
i have a backup on a NAS which also gives me problems:
i load deja dup and click on restore from a previous backup
under location i select network server
under server address i enter nfs://192.168.1.8
under folder i enter /Backups/Ubuntu
i click search, and after a second or 2 it says “mount point does not exist.”
what am i doing wrong?
When you reach the initramfs
prompt, type exit
Any messages?
yeah, i get lots of messages, but i can’t repeat them here because this site refuses to work on my tablet. WHAT’S UP WITH THAT?
anyway, it looks like there is one block of messages that is repeated several times as the computer tries to boot, but it won’t be long before i look at that initramffs prompt again
Are you able to take a screenshot or photo of the errors that you can upload?
i can take a screenshot, but like i said, this site doesn’t work on my tablet, so how can i upload it?
Perhaps use a free image hosting site?
Then paste the link back in the post.
For most folks, images are trivial to upload. The option is right there in your compose window.
We cannot solve your tablet problem with the information given (i.e. none).
All I can tell you is that this site, including the compose window options, works properly using Firefox on my tablet.
/dev/mapper/ubuntu--vg-ubuntu--lv contains a file system with errors
You probably need to run a file system check and repair (via a live session) on your volumes.
I know you can use fsck
for ext4
file systems but I do not know the syntax for volume groups (vg) and logical volumes (lv)
It’s advisable to backup your personal files before attempting any repair
You can manually run the file system check (fsck) on the affected volume. This can be done by booting into a recovery environment or using a live USB. Once you have access to the system, you can run the following command:
fsck /dev/mapper/ubuntu--vg-ubuntu--lv
This command will check and repair the file system errors. if that don’t help check your LVM config:
less /etc/lvm/lvm.conf
Your in good hands with @tea-for-one
That’s very kind
I’ve got a brown paper envelope, holdin’ foldin’, how much do you need?
> fsck /dev/mapper/ubuntu--vg-ubuntu--lv
that gives me the following output:
fsck from util-linux 2.40.2
e2fsck 1.47.2 (1-Jan-2025)
fsck.ext2: No such file or directory while trying to open /dev/mapper/ubuntu–vg-ubuntu–lv~
Possibly non-existent device?
and when i say sudo fsck /dev/sda3
that gives me
fsck from util-linux 2.40.2
fsck: fsck.crypto_LUKS not found; ignore /dev/sda3
Power outage or a forced shutdown can most certainly throw a wobbly.
It makes no sense to attempt to run a filesystem checker on /dev/sdXY
once it’s been encrypted, as apart from the LUKS header, the encrypted data should be essentially indistinguishable from random data.
mine:
less /etc/fstab|grep /dev/disk/by-id/dm
/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-dm_crypt-0 none swap sw 0 0
This should explain why `/dev/sdXY is no good.
df -HT /dev/sdc3
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.2G 0 7.2G 0% /dev
That is the swap area.
blkid | grep dm
/dev/mapper/dm_crypt-0: LABEL="dm_crypt-0" UUID="4b812e68-63fa-4a87-9d1f-d52ad336f3b8" TYPE="swap"
By chance have you tried to update your initramfs
and that can run from Recovery at boot.
sudo cryptsetup -v status /dev/mapper/dm_crypt-0
/dev/mapper/dm_crypt-0 is active and is in use.
type: PLAIN
cipher: aes-cbc-essiv:sha256
keysize: 256 bits
key location: dm-crypt
device: /dev/sdc3
sector size: 512
offset: 0 sectors
size: 8388608 sectors
mode: read/write
Command successful.
I think I still owe you some don’t I?
what is the output of:
sudo fdisk -l
it gives me A LOT of lines:
Disk /dev/loop0: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 74.24 MiB, 77844480 bytes, 152040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 66.77 MiB, 70008832 bytes, 136736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 73.9 MiB, 77492224 bytes, 151352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 11.75 MiB, 12320768 bytes, 24064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 245.5 MiB, 257421312 bytes, 502776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 10.72 MiB, 11239424 bytes, 21952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA DT01ACA1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0EABE92B-A09F-B640-8D97-F2DE1142E7A1
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 4198399 4194304 2G Linux filesystem
/dev/sda3 4198400 1953521663 1949323264 929.5G Linux filesystem
Disk /dev/sdb: 1.82 TiB, 2000365289472 bytes, 3906963456 sectors
Disk model: My Passport 25E1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytesom sg1 tty10 tty22 tty34 tty46 tty58 ttyS10 ttyS22 ttyS6 vcs1 vcsu zfs
sysop@PC:/dev$ sudo fdisk -l
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7E035183-19FC-4FCE-8401-3D662808252E
Device Start End Sectors Size Type
/dev/sdb1 2048 2203647 2201600 1G EFI System
/dev/sdb2 2203648 6397951 4194304 2G Linux filesystem
/dev/sdb3 6397952 3906961407 3900563456 1.8T Linux filesystem
Disk /dev/mapper/dm_crypt-0: 1.82 TiB, 1997071712256 bytes, 3900530688 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 1.82 TiB, 1997067517952 bytes, 3900522496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop8: 11.13 MiB, 11673600 bytes, 22800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 505.09 MiB, 529625088 bytes, 1034424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 516.01 MiB, 541073408 bytes, 1056784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 404.38 MiB, 424017920 bytes, 828160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop12: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop13: 290.78 MiB, 304902144 bytes, 595512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop14: 14.42 MiB, 15118336 bytes, 29528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop16: 10.83 MiB, 11354112 bytes, 22176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop15: 10.32 MiB, 10821632 bytes, 21136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop17: 38.73 MiB, 40615936 bytes, 79328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop18: 50.9 MiB, 53370880 bytes, 104240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop19: 476 KiB, 487424 bytes, 952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop20: 568 KiB, 581632 bytes, 1136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop21: 137.29 MiB, 143962112 bytes, 281176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop22: 210.25 MiB, 220463104 bytes, 430592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop23: 245.32 MiB, 257236992 bytes, 502416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Hello everyone, first let me apologize for this post mainly due to the fact that the actual instructions are ai generated. I’m a very slow typer. The instructions do work as I’ve used them on more than several occasions to fix older PC’s myself and in no way am I trying to generate garbage responses to valid questions or concerns. I just find ai extremely useful if you use it properly and a slow brasher.
Here are steps you can take to attempt to repair the disk and recover your files:
Do a re-install keeping your existing files- you can perform a re-installation of your operating system while keeping your existing files. This process is often referred to as a “repair installation” or “in-place upgrade.” Here’s how I ‘ve personally saved files that I wanted to retain when I had issues with older or bad HD’s
-
Create a Bootable USB Drive: If you have one great,
- Download the latest version of Ubuntu (24.04 in your case) from the official website.
- Use a tool like
Rufus
(for Windows) orEtcher
(for macOS/Linux) to create a bootable USB drive.
-
Boot from the USB Drive:
- Insert the USB drive and restart your computer.
- Access the boot menu (usually by pressing a key like F12, Esc, or Del during startup) and select the USB drive to boot from.
-
Start the Installation:
- Once booted from the USB, select “Try Ubuntu” to enter the live environment.
- From the live environment, double-click the “Install Ubuntu” icon.
-
Choose Installation Type:
- When prompted, select the option that says “Upgrade Ubuntu 23.10 to 24.04” (or similar). This option will keep your files and settings intact while upgrading the system.
- If you don’t see this option, you may need to select “Something else” and manually choose the partition where your current system is installed, ensuring you do not format it.
-
Follow the Prompts:
- Continue with the installation process, following the prompts. The installer will handle the upgrade while preserving your files.
-
Complete the Installation:
- Once the installation is complete, reboot your system and remove the USB drive.
Important Notes:
- Applications: While your personal files will be preserved, you may need to reinstall applications that were not part of the default installation.
- Settings: Most of your settings should remain intact, but it’s a good idea to check them after the installation.
- Backup: Always have a backup of your important data before performing any installation or upgrade, as there is always a risk of data loss.
By following these steps, you should be able to reinstall Ubuntu while keeping your existing files.
Moderator note: this post was mostly AI generated but the user has told us the method works for him.
you may ignore the /dev/loop
and I can see there’s 2 drives (I’m guessing you install on external drive) as shown here:-
if I may ask; have you tried boot using other usb slot? sometimes the usb you’re attach now had physical fatigue.
other suggestion probably run liveusb and get into rescue mode (or chroot
in live session) and review/repair /etc/fstab
from there, or better run fsck
along the way.