Boot - initrd.img missing [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Boot - initrd.img missing [SOLVED]

Post by slometa » Tue Sep 11, 2018 1:09 pm

I had a warning about 100%of boot. I found out that I supposed to have unnecessary initrd files and removed them according to information (screenshot attached).

Now I started computer and it's missing file (stated in the subject). What can I do, not to make a bigger mess?

Thank you a lot!
Attachments
IMG_20180910_104503.jpg
after choosing the first option
IMG_20180910_104828.jpg
screen at the beginning
Screenshot_20180910-103044.png
instructions I followed...
Last edited by slometa on Wed Sep 26, 2018 4:04 pm, edited 1 time in total.

User avatar
Lord Boltar
Level 5
Level 5
Posts: 626
Joined: Mon Jan 09, 2017 7:24 pm
Location: Sunny Florida

Re: Boot - initrd.img missing

Post by Lord Boltar » Tue Sep 11, 2018 1:16 pm

This website pretty much explains how to do it

https://linoxide.com/linux-how-to/fixin ... age-linux/
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members

The only way for evil to prosper is for good men to do nothing

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Tue Sep 11, 2018 1:22 pm

Copy initrd.lz and vmlinuz from installation media's casper folder into installed system boot folder and edit grub.cfg file as an administrator replacing vmlinuz-xxx and intrd.img-xxx lines using initrd.lz and vmlinuz.

When you have rebooted computer using those live media files, install some kernel like

Code: Select all

apt install linux-generic

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Wed Sep 12, 2018 12:29 pm

Sorry, I would need a bit more help ;(.
I checked both your answers. As I use Mint (not Ubuntu), does it mean that I should find my version of Mint? Unfortunately I don't have it on CD :roll: .
Thank you :idea: :idea: :idea:

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Wed Sep 12, 2018 2:34 pm

slometa wrote:
Wed Sep 12, 2018 12:29 pm
Sorry, I would need a bit more help ;(.
I checked both your answers. As I use Mint (not Ubuntu), does it mean that I should find my version of Mint? Unfortunately I don't have it on CD :roll: .
Thank you :idea: :idea: :idea:
Download some linux like 17.3 Mate, and make a live media (USB or DVD)

When you have a live media, boot with that media and open Terminal and run

Code: Select all

sudo blkid  ## which tells your disks and partitions
... mount and chroot into your installed system. An example /dev/sda1

Code: Select all

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc
sudo chroot /mnt
nano /etc/resolv.conf
... add line

Code: Select all

nameserver 8.8.8.8
... save and quit
Ctrl o
Ctrl x

Code: Select all

apt-get update
apt-get install linux-generic
update-initramfs -u
update-grub
grub-install /dev/sda
sync
exit
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt/dev
sudo umount /mnt
Alternatively you can update/create all initrds.

Code: Select all

update-initramfs -c -k all

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Thu Sep 13, 2018 12:44 pm

Thank you very much!
I successfully came to sudo mount /dev/sda1 /mnt
Then I entered: sudo mount --bind /dev /mnt/dev
and it replies : mount: mount point /mnt/dev does not exist.
What is still going wrong 😒?
Thanks 🙏

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Thu Sep 13, 2018 3:01 pm

slometa wrote:
Thu Sep 13, 2018 12:44 pm
Thank you very much!
I successfully came to sudo mount /dev/sda1 /mnt
Then I entered: sudo mount --bind /dev /mnt/dev
and it replies : mount: mount point /mnt/dev does not exist.
What is still going wrong 😒?
Thanks 🙏
Are you sure not to made a typo? What tells sudo parted -l and inxi -po ?

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Fri Sep 14, 2018 12:16 am

I have checked and the spelling should be OK.

It says :
parted: invalid option - - '1'
Usage: parted [hlmsv] [-a<align>] [DEVICE [COMMAND [PARAMETERS] ]...]
and
Partition: ID-1 / size: 1.96 used: 66M (4) fs: overlay dev: N/A
ID-2: mnt size: 23M used: 79M (36%) fs: ext2 dev: /dev/sda1
Unmounted: ID-1: /dev/sda5 size: 749.90G label: N/A uuid N/A
ID-2: /dev/dm-0 size: 745.73G
fs: ext4 label: N/A uuid: 3977163c-721e-487e-9277-1fa982f3a425
ID-3: /dev/dm-1 size: 4.16G
fs: swap label: N/A uuid: ce207fea-ad74-43eb-bd7c-b449975cfbe

When I before also tried sudo mount /dev/sda5 /mnt
It returned: mount: unknown filesystem type 'LVM2_member'.
Thanks ☀️☀️☀️

Ps. In the first post I tried to post a photo of screen, but under attachment the only possibility is to take photo or video (not to download it from database), but the photo taken is then too large to upload (no option to minimize). (then I used another computer). So the only way on this smart....phone is to copy it by hand 😉

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Sat Sep 15, 2018 12:14 pm

slometa wrote:
Fri Sep 14, 2018 12:16 am
When I before also tried sudo mount /dev/sda5 /mnt
It returned: mount: unknown filesystem type 'LVM2_member'.
Outs... You have a LVM partition.
http://ask.xmodulo.com/mount-lvm-partition-linux.html

PS. l is a small L, not 1 .. :wink:

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Sat Sep 15, 2018 5:38 pm

I think I solved LVM. Then I tried again: sudo mount - -bind -dev - mnt/dev - not successful. Is the command as such ok or is it supposed to be replaced by specific data?
I actually then skipped other mounts : /sys and /proc
and entered sudo chroot /mnt which turned to mint / #. Then I went to nano, entered nameserver and when I saved and exited, it showed File name to write : /etc/resolv/conf - ok, I pressed enter and it returned : no such file or directory :cry:.
I'm stucked :roll:. Not so easy...
Thanks for all your help!

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Sun Sep 16, 2018 3:27 am

How about if you simpy copy vmlinuz and initrd.lz into /dev/sda1's boot folder and edit its grub.cfg file?
http://forums.linuxmint.com/viewtopic.p ... 8#p1524799

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Sun Sep 16, 2018 4:56 am

I admit... I don't know how to perform such (probably simply indeed) task... :roll:. I checked if I can find some instructions on net, but couldn't find anything useful for this caset.
I think I miss still a lot of basics... :twisted:.
Please don't get upset with me... :mrgreen:

User avatar
administrollaattori
Level 15
Level 15
Posts: 5856
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Boot - initrd.img missing

Post by administrollaattori » Sun Sep 16, 2018 11:21 am

slometa wrote:
Sun Sep 16, 2018 4:56 am
I admit... I don't know how to perform such (probably simply indeed) task... :roll:. I checked if I can find some instructions on net, but couldn't find anything useful for this caset.
I think I miss still a lot of basics... :twisted:.
Please don't get upset with me... :mrgreen:
How about if you reinstalling with newer version of Mint?
https://www.linuxmint.com/download_all.php

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Sun Sep 16, 2018 11:52 am

But then I'm losing all my files? I have mostly backuped, but not everything and also backup is not completely updated....

Laurent85
Level 15
Level 15
Posts: 5923
Joined: Tue May 26, 2015 10:11 am

Re: Boot - initrd.img missing

Post by Laurent85 » Sun Sep 16, 2018 12:08 pm

Generating a new initrd should be straightforward provided we have all the needed information to guide you through.
Please post from the live usb session below commands output, use copy paste instead of trying to type in each command:

Code: Select all

sudo parted --list --script
ls /dev/mapper
sudo vgchange -ay
Image

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Sun Sep 16, 2018 1:54 pm

I managed :P :P :P

mint@mint ~ $ sudo parted --list --script
Model: ATA WDC WD7500BPVX-6 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 750GB 750GB extended
5 257MB 750GB 750GB logical lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/mint--vg-root: 746GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 746GB 746GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/mint--vg-swap_1: 4161MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 4161MB 4161MB linux-swap(v1)


Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Model: hp DVDRW SU208FB (scsi)
Disk /dev/sr0: 1678MB
Sector size (logical/physical): 2048B/2048B
Partition Table: mac

Number Start End Size File system Name Flags
1 8192B 24.6kB 16.4kB Apple
2 151MB 160MB 9306kB EFI


mint@mint ~ $ ls /dev/mapper
control mint--vg-root mint--vg-swap_1
mint@mint ~ $ sudo vgchange -ay
2 logical volume(s) in volume group "mint-vg" now active
mint@mint ~ $

mint@mint ~ $ sudo parted --list --script
Model: ATA WDC WD7500BPVX-6 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 750GB 750GB extended
5 257MB 750GB 750GB logical lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/mint--vg-root: 746GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 746GB 746GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/mint--vg-swap_1: 4161MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 4161MB 4161MB linux-swap(v1)


Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Model: hp DVDRW SU208FB (scsi)
Disk /dev/sr0: 1678MB
Sector size (logical/physical): 2048B/2048B
Partition Table: mac

Number Start End Size File system Name Flags
1 8192B 24.6kB 16.4kB Apple
2 151MB 160MB 9306kB EFI


mint@mint ~ $ ls /dev/mapper
control mint--vg-root mint--vg-swap_1
mint@mint ~ $ sudo vgchange -ay
2 logical volume(s) in volume group "mint-vg" now active
mint@mint ~ $

Laurent85
Level 15
Level 15
Posts: 5923
Joined: Tue May 26, 2015 10:11 am

Re: Boot - initrd.img missing

Post by Laurent85 » Sun Sep 16, 2018 2:18 pm

Procedure as follows:

Ignore possible error messages reporting device is not mounted, that's a precaution devices are not mounted before continuing:

Code: Select all

sudo umount /dev/sda1
sudo umount /dev/mapper/mint--vg-root
Below commands should return nothing, that's normal:

Code: Select all

sudo mount /dev/mapper/mint--vg-root /mnt
sudo mount /dev/sda1 /mnt/boot
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt mount -t proc proc /proc
sudo chroot /mnt mount -t sysfs sysfs /sys
sudo chroot /mnt mount -t devpts devpts /dev/pts
Before continuing post below commands output:

Code: Select all

df -h /mnt/boot /mnt
ls /mnt/boot
sudo chroot /mnt apt search ~ilinux-
Last edited by Laurent85 on Sun Sep 16, 2018 4:11 pm, edited 1 time in total.
Image

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Sun Sep 16, 2018 4:00 pm

The output below. Thanks.
Is it really '~' sign before illinux? It (alt gr 1) doesn't work on terminal, it looks like... And '-' sign is not proper, it replies..

mint@mint ~ $ df -h /mnt/boot /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 236M 79M 145M 36% /mnt/boot
/dev/mapper/mint--vg-root 684G 24G 626G 4% /mnt
mint@mint ~ $ ls /mnt/boot
abi-3.13.0-141-generic memtest86+_multiboot.bin
abi-3.13.0-144-generic retpoline-3.13.0-144-generic
abi-3.13.0-149-generic retpoline-3.13.0-149-generic
abi-3.13.0-153-generic retpoline-3.13.0-153-generic
abi-3.13.0-157-generic retpoline-3.13.0-157-generic
abi-3.13.0-85-generic System.map-3.13.0-141-generic
abi-3.16.0-38-generic System.map-3.13.0-144-generic
config-3.13.0-141-generic System.map-3.13.0-149-generic
config-3.13.0-144-generic System.map-3.13.0-153-generic
config-3.13.0-149-generic System.map-3.13.0-157-generic
config-3.13.0-153-generic System.map-3.13.0-85-generic
config-3.13.0-157-generic System.map-3.16.0-38-generic
config-3.13.0-85-generic vmlinuz-3.13.0-141-generic
config-3.16.0-38-generic vmlinuz-3.13.0-144-generic
grub vmlinuz-3.13.0-149-generic
initrd.img-3.16.0-38-generic.new vmlinuz-3.13.0-153-generic
lost+found vmlinuz-3.13.0-157-generic
memtest86+.bin vmlinuz-3.13.0-85-generic
memtest86+.elf vmlinuz-3.16.0-38-generic
mint@mint ~ $ sudo chroot apt search -ilinux-
chroot: cannot change root directory to apt: No such file or directory

mint@mint ~ $ df -h /mnt/boot /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 236M 79M 145M 36% /mnt/boot
/dev/mapper/mint--vg-root 684G 24G 626G 4% /mnt
mint@mint ~ $ ls /mnt/boot
abi-3.13.0-141-generic memtest86+_multiboot.bin
abi-3.13.0-144-generic retpoline-3.13.0-144-generic
abi-3.13.0-149-generic retpoline-3.13.0-149-generic
abi-3.13.0-153-generic retpoline-3.13.0-153-generic
abi-3.13.0-157-generic retpoline-3.13.0-157-generic
abi-3.13.0-85-generic System.map-3.13.0-141-generic
abi-3.16.0-38-generic System.map-3.13.0-144-generic
config-3.13.0-141-generic System.map-3.13.0-149-generic
config-3.13.0-144-generic System.map-3.13.0-153-generic
config-3.13.0-149-generic System.map-3.13.0-157-generic
config-3.13.0-153-generic System.map-3.13.0-85-generic
config-3.13.0-157-generic System.map-3.16.0-38-generic
config-3.13.0-85-generic vmlinuz-3.13.0-141-generic
config-3.16.0-38-generic vmlinuz-3.13.0-144-generic
grub vmlinuz-3.13.0-149-generic
initrd.img-3.16.0-38-generic.new vmlinuz-3.13.0-153-generic
lost+found vmlinuz-3.13.0-157-generic
memtest86+.bin vmlinuz-3.13.0-85-generic
memtest86+.elf vmlinuz-3.16.0-38-generic
mint@mint ~ $ sudo chroot apt search -ilinux-
chroot: cannot change root directory to apt: No such file or directory

Laurent85
Level 15
Level 15
Posts: 5923
Joined: Tue May 26, 2015 10:11 am

Re: Boot - initrd.img missing

Post by Laurent85 » Sun Sep 16, 2018 4:47 pm

slometa wrote:
Sun Sep 16, 2018 4:00 pm
The output below. Thanks.
Is it really '~' sign before illinux?
Yes. Anyway there was a typo in my command, I edited my above post but you can go to the next step.
It (alt gr 1) doesn't work on terminal, it looks like... And '-' sign is not proper, it replies..
Use the mouse to copy and paste into the terminal instead.

Continuing, enter chroot:

Code: Select all

sudo chroot /mnt /bin/bash
rm /boot/initrd.img-3.16.0-38-generic.new
update-initramfs -u -k 3.16.0-38-generic
update-initramfs -u -k 3.13.0-157-generic
update-grub
umount /dev/pts /sys /proc
exit
Unmount devices:

Code: Select all

sudo umount /mnt/dev
sudo umount /mnt/boot
sudo umount /mnt
Reboot.
If the boot succeeds it's not over, a lot of kernel clean up is needed afterward.
Image

slometa
Level 2
Level 2
Posts: 68
Joined: Fri Apr 08, 2016 4:19 pm

Re: Boot - initrd.img missing

Post by slometa » Mon Sep 17, 2018 3:40 am

I copied sudo chroot /mnt apt search ~ilinux-
it returns No such file or directory.
I continued with next sudo chroot /mnt /bin/bash
and the outcome the same.
Not good, right?
Thanks.

Post Reply

Return to “Newbie Questions”