0

First signs something was wrong : a file wouldn't save and a browser bookmark was not recorded.

du -h

Said the partition was 100% full. I didn't think that was true, but I deleted 4 full-feature movies (with the key, so they don't just go into the trash). I emptied the trash anyway. The above command still said the partition (I have only one working partition, with Lubuntu) was 100% full.

I thought the computer was simply playing up and I rebooted. Or tried to.

When I try to boot, I see the splash screen, then some text (this is normal) and the mouse pointer appears (and moves when I touch the scratchpad). Nothing more.

Pressing F12 gives me a boot menu with Ubuntu, Windows (was overwritten but still has some stuff in /dev/dsa1) or UEFI. No advanced options or recovery mode. Any of these 3 options end up as described above.

Pressing escape repeatedly while booting gives me a prompt :

grub>

Following instructions here: howtogeek.com/887757/how-to-use-grub-rescue-to-fix-linux I typed

grub> set root=(hd0,2)
grub> linux /boot/vmlinuz-6.5.0-28-generic root=/dev/sda2
grub> initrd /boot/initrd.img-6.5.0.28-generic
grub> boot

This said there was no hda2 and gave me another type of command prompt, this one was called

initramfs>

Typing

initramfs> exit

goes back and changes the keyboard layout back to azerty. So it has found hda2, otherwise how could it know I have an azerty keyboard? Before I had to type in qwerty on the azerty keyboard.

Searching online returned many post talking about new installations. This is not a new installation and I don't want to loose the stuff I have on that computer.

I also found lots of advice using normal command-line instructions. Please don't suggest any of this as I cannot access any bash terminal. I can only access grub> and initramfs> command prompts and the language is very different.

The closest is : Boot drops to a (initramfs) prompts/busybox but it doesn't answer my problem.

Alain Reve
  • 217
  • 1
  • 4
  • 18

1 Answers1

0

This solution is not perfect, data contained in a file which was opened at the moment when the problem occurred was lost (even though the file had been saved).

I created a writable and bootable usb stick with lubuntu on it. I booted from it and started looking around in my computer.

cd /dev/disk
ls
   by-id  by-label  by-partlabel  by-partuuid  by-uuid
cd by-id/
ls
   mmc-DF4064_0x84129607  
   mmc-DF4064_0x84129607-part1  
   mmc-DF4064_0x84129607-part2
   ... and others which pointed to parts of the usb disk

The names could be different on your machine (I have no idea what they could be). Have a good look in all the by-id by-label by-partlabel by-partuuid and by-uuid directories until you feel quite sure you understand what could correspond to the lost sda2. (If you see an sda2 anywhere, it could refer to a part of the usb stick, check it's contents before saying "hurray!").

I decided mmc-DF4064_0x84129607-part2 could be my old sda2. Tip : when you run lubuntu from a writable usb stick, you have automatic access to sudo commands, it doesn't ask you for a password.

sudo mkdir /media/disk
sudo mount /dev/disk/by-id/mmc-DF4064_0x84129607-part2 /media/disk
cd /media/disk/
ls
cd home
ls

If you see your old username, now you can say "hurray!". I saw mine but couldn't open the directory ("Permission denied"). I typed the strongest command I could think off (not usually recommended) :

sudo chmod 777 <username>

I checked some of my files. The names were there but at least one file was empty. The one I had been working on.

df -h
   /dev/mmcblk0p2
   Size   Used   Avail   Use%
   57G    54G    0       100%
   ... and others

I'm not sure whether there was an mmcblk0p2 in /dev before. I was looking for sda2 and I took no notice of other stuff, such as all the ttys.

Anyway, that answer is inconsistent, isn't it? If 54G out of 57G are used, then 3G should be available, not 0G. But that's what it said. I deleted 2 more large videos, removing 2.6G in all. (I guess you could copy large files to the writable and bootable usb stick, if there's enough room on it). Then :

df -h
   /dev/mmcblk0p2
   Size   Used   Avail   Use%
   57G    52G    2.5G    96%
   ... and others

Still inconsistent, but at least it said there was a bit of room on this machine. So I turned it off, removed the usb stick and booted up. IT BOOTED !!!

This morning, it looked like

df -h
   /dev/mmcblk0p2
   Size   Used   Avail   Use%   Gone fishing
   57G    52G    2.1G    97%    2.9G
   ... and others

After removing other videos it became

df -h
   /dev/mmcblk0p2
   Size   Used   Avail   Use%   Gone fishing
   57G    48G    6.1G    89%    2.9G 
   ... and others

The "Gone fishing" category is just my invention. I'm posting this to show that the size of "Gone fishing" seems constant.

sudo find ./ -empty

Outputs a very long list of empty files when it is run from / and when it is run from a given directory (which contents I remember) it shows empty files in which there should be content. Tip : it is a good idea to run "find" as root. It won't do any harm and it prevents lists of "permission denied" from cluttering up the output.

As I said, this solution is not perfect. I'm still in need of advice from specialists. Meanwhile, it may help someone, and it also gives more information to the specialists who may advise me.

Alain Reve
  • 217
  • 1
  • 4
  • 18