The Link "initrd.img.old" is Broken

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
theonow

The Link "initrd.img.old" is Broken

Post by theonow »

How to fix a broken ititrd.img.old link?

This link cannot be used, because its target "/boot/initrd.img-3.5.0-17-generic" doesn't exist.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

This type of link is usually created when the kernel is updated. It points to the previous version. If that previous version is removed, the link should be removed as well. As the actual file the link should point to doesn't exist anymore, I assume kernel 3.5.0-17 no longer exists on your system either, so you can just remove the link.

On the other hand, you may have inadvertently removed /boot/initrd.img-3.5.0-17-generic without properly uninstalling that kernel.

Does the link /vmlinuz.old exist?
Is there a file /boot/vmlinuz-3.5.0-17-generic?
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

e
grizzler wrote:This type of link is usually created when the kernel is updated. It points to the previous version. If that previous version is removed, the link should be removed as well. As the actual file the link should point to doesn't exist anymore, I assume kernel 3.5.0-17 no longer exists on your system either, so you can just remove the link.

On the other hand, you may have inadvertently removed /boot/initrd.img-3.5.0-17-generic without properly uninstalling that kernel.

Does the link /vmlinuz.old exist?
Is there a file /boot/vmlinuz-3.5.0-17-generic?
No /vmlinuz.old, but there is /boot/vmlinuz-3.5.0-17-generic. However, it is listed as a link to a DOS/Windows executable. The only OS on the hard drive was Linux Mint 14. I'm using an .iso flash drive at this time to look at the contents of the Hard Drive. My friend helped me to bring access to them, but the Hard Drive is having a hard time booting.

Could a program like TestDisk make my Hard Drive bootable once again? Glad to have access to my old files once again, but would be nice to once again use the original hard drive and add new files, folders, etc.

Thanks for your response, grizzler.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

theonow wrote:No /vmlinuz.old, but there is /boot/vmlinuz-3.5.0-17-generic. However, it is listed as a link to a DOS/Windows executable.
Yes, my system's vmlinuz file is also reported as such. A bit odd, but apparently that's what these linux kernel files look like internally.
However, you mention /boot/vmlinuz-3.5.0-17-generic is a link. Are you sure? I would expect the link to be vmlinuz in the root of the drive and vmlinuz-3.5.0-17-generic in /boot to be the target of that link.
The only OS on the hard drive was Linux Mint 14. I'm using an .iso flash drive at this time to look at the contents of the Hard Drive. My friend helped me to bring access to them, but the Hard Drive is having a hard time booting.
I can imagine. The initial ram disk (the initrd.img file in /boot) appears to be missing. Strange that the link to it should have an .old extension.
Could a program like TestDisk make my Hard Drive bootable once again?
I don't know if TestDisk would be of any use here. Has the hard drive been written to since the initrd.img file disappeared? And why did it disappear in the first place?

To make sure we're looking at the right files and not at incomplete remnants of a previous kernel, what exactly does the /boot directory contain? Also, what is the contents of the /boot/grub/grub.cfg file?

Does a GRUB menu appear when you try to boot from the hard drive? If it does, does it only show the 3.5.0-17 kernel to select?
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

My hard drive doesn't want to boot at all. It tells me, "MDM could not write your authorization file." I've gotten the login menu and that's it. Also, can I change the entire hard drive permissions back to my username as it only shows user as being root?

At this point I'm thinking to get a high gigabyte flash drive and save what I can onto it and do a fresh install.

Contents of my /boot/grub/grub.cgf file

Code: Select all

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
else
  search --no-floppy --fs-uuid --set=root 9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="$1"
	if [ "$1" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 14 Cinnamon 64-bit, 3.5.0-17-generic (/dev/sda1)' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	else
	  search --no-floppy --fs-uuid --set=root 9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	fi
	linux	/boot/vmlinuz-3.5.0-17-generic root=UUID=9bc9b613-8d72-4f40-94e7-a204dc0aa5c7 ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.5.0-17-generic
}
menuentry 'Linux Mint 14 Cinnamon 64-bit, 3.5.0-17-generic (/dev/sda1) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	else
	  search --no-floppy --fs-uuid --set=root 9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	fi
	echo	'Loading Linux 3.5.0-17-generic ...'
	linux	/boot/vmlinuz-3.5.0-17-generic root=UUID=9bc9b613-8d72-4f40-94e7-a204dc0aa5c7 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.5.0-17-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	else
	  search --no-floppy --fs-uuid --set=root 9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	fi
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	else
	  search --no-floppy --fs-uuid --set=root 9bc9b613-8d72-4f40-94e7-a204dc0aa5c7
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Last edited by theonow on Fri Oct 18, 2013 2:58 am, edited 1 time in total.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

theonow wrote:Contents of my /boot/grub/grub.cgf file
Thanks. You may want to put that between Code tags.
My hard drive doesn't want to boot at all. It tells me, "MDM could not write your authorization file." I've gotten the login menu and that's it.
Wait a minute. If you get that far, the machine has already booted. This is starting to look like an entirely different problem than I originally thought it was.
It could be the permissions of the /tmp directory. If you boot with the flash drive and look at the hard drive's root directory in the file browser (nautilus/nemo/caja/whatever), does the tmp directory there have all read/write/execute bits and the sticky bit set on the Permissions tab?
Also, what are the permissions of the file .ICEauthority in your home directory?
Also, can I change the entire hard drive permissions back to my username as it only shows user as being root?
No, that would be a sure way to mess things up further. Most of a hard drive should be owned by root.
At this point I'm thinking to get a high gigabyte flash drive and save what I can onto it and do a fresh install.
That's always an option.
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote: If you boot with the flash drive and look at the hard drive's root directory in the file browser (nautilus/nemo/caja/whatever), does the tmp directory there have all read/write/execute bits and the sticky bit set on the Permissions tab?
Also, what are the permissions of the file .ICEauthority in your home directory?


Opened the /tmp directory saw a folder titled pulse-PKdhtXMmr18n. Tells me I do not have the required permissions to open that folder. Root is owner and I can not change permissions.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

Let's go back a bit. Open the root of the hard drive in the file browser. Right click on the tmp folder, select the last item in the menu (probably 'Properties', but I can't be sure because I don't use an English language setup), click the third tab in the Properties window of tmp (most likely named 'Permissions') and look at the window. Are the owner/group both root? Are the nine option flags on the next three lines all set? Is the sticky bit set?

Then open your home folder in the file browser. Make sure hidden items are visible (press Ctrl+H if they aren't). Open the Properties window of the file .ICEauthority, just like described above for tmp, and look at the Permissions. Are owner and group both your username? Of the nine option flags on the next three lines, are only the first two top left set (owner read/write)?
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote: Open the Properties window of the file .ICEauthority, just like described above for tmp, and look at the Permissions. Are owner and group both your username? Of the nine option flags on the next three lines, are only the first two top left set (owner read/write)?
No. The owner and group of the .ICEauthority file are Owner: 1000- user #1000. Access for owner is read and write. Group access is read only.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

On Debian and Ubuntu based installations, the user id used for the only user on a single user system usually is 1000. I should have mentioned that you can't see the correct username when you boot with a live system on CD or flash drive. So the number should correspond to your username. As you don't mention tmp, I'll assume the settings there were correct.
Group access is read only.
Group shouldn't have any kind of access, not even read. Can you switch that option off using the file browser?
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote:Group shouldn't have any kind of access, not even read. Can you switch that option off using the file browser?
Tells me I'm not the owner and cannot change the permissions. All the menus are grey and can not be clicked on. No options can be switched when looking at my hard drive.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

There should be a way to start the file browser as root, even on a live cd/usb system, by pressing Alt+F2 and entering gksu nautilus (provided nautilus is the name of the file browser you use) or entering that in a terminal window. It will ask for a password, but you need to set that first using the procedure described here: http://forums.linuxmint.com/viewtopic.php?f=6&t=63075
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote:There should be a way to start the file browser as root, even on a live cd/usb system, by pressing Alt+F2 and entering gksu nautilus (provided nautilus is the name of the file browser you use) or entering that in a terminal window. It will ask for a password, but you need to set that first using the procedure described here: http://forums.linuxmint.com/viewtopic.php?f=6&t=63075


To clarify so I hope I don't make a big mistake while doing this, do sudo passwd, make a password, then run su whateverpassword I use, and try to see if I can make my hard drive bootable again? Thanks for all this help grizzler. With all this help I may just be able to get my hard drive bootable again.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

Yes, if you can run the file browser as root, you should be able to set those permissions correctly. However, if after that you still get the same error when you try to log in, I'm out of ideas. As far as I am aware, the only other possible source of this problem would be a complete lack of free space on that disk.
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote:Yes, if you can run the file browser as root, you should be able to set those permissions correctly. However, if after that you still get the same error when you try to log in, I'm out of ideas. As far as I am aware, the only other possible source of this problem would be a complete lack of free space on that disk.
How should I change the permissions and which folders should I change when running? Who should I change the owner to, as my username is not listed. Do I list it as Nobody, Mint live session user, or something entirely different. Thanks for the help as now I can actually change the owners, accessibility, etc. And as you mentioned, group should be listed as nobody with no access folder and files access as --- or None?

In addition, there should be enough free space as only 40GB are used on the 500GB Hard Drive.

Thanks for telling me how to make the permissions in file manager working and changeable.

One last question: Can Gparted help with this problem as well?
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

As I wrote before, the owner is listed by number (1000) when you boot from a live cd/usb and that's fine. Changing the owner of anything to Nobody will mess things up further, so don't!

All you need to do is switch off the Group Read access bit for .ICEauthority. Don't change anything else. Login programs like MDM and GDM can be very picky about permissions and .ICEauthority is supposed to have read and write access for the user only and nobody else.

Gparted is for partitioning, so it won't help with this problem in any way.
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote:As I wrote before, the owner is listed by number (1000) when you boot from a live cd/usb and that's fine. Changing the owner of anything to Nobody will mess things up further, so don't!

All you need to do is switch off the Group Read access bit for .ICEauthority. Don't change anything else. Login programs like MDM and GDM can be very picky about permissions and .ICEauthority is supposed to have read and write access for the user only and nobody else.

Gparted is for partitioning, so it won't help with this problem in any way.
Switched group access to none, rebooted from hard drive:

Failed to start XServer (your graphical interface) It is likely that it is not set up correctly.

The XServer is now disabled. Restart MDM when it is configured correctly.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

As I wrote earlier, if this doesn't fix it, I'm out of ideas.

The fact that another component is now complaining indicates there's more amiss with your system than just that one permission bit on .ICEauthority (you did check the permissions on the /tmp folder I mentioned, didn't you?). There's no telling what else might fail next. Besides, with the X server involved, we're definitely getting into unfamiliar territory for me. Any advice I could give would just be a rehash of a search result without real insight. Not useful. Sorry.
theonow

Re: The Link "initrd.img.old" is Broken

Post by theonow »

grizzler wrote:As I wrote earlier, if this doesn't fix it, I'm out of ideas.

The fact that another component is now complaining indicates there's more amiss with your system than just that one permission bit on .ICEauthority (you did check the permissions on the /tmp folder I mentioned, didn't you?). There's no telling what else might fail next. Besides, with the X server involved, we're definitely getting into unfamiliar territory for me. Any advice I could give would just be a rehash of a search result without real insight. Not useful. Sorry.
Changed the permission of the .ICEauthority file, what should the permissions of the tmp folder be? When I open the tmp folder nothing is inside of it and the permissions are both set to root.

If nothing else can be done, I'm just glad my friend helped me get back access to my files and folders so I can copy what I need onto a flash drive and just make a fresh install.
grizzler

Re: The Link "initrd.img.old" is Broken

Post by grizzler »

You don't have to look inside the folder at this stage.

A couple of days ago I wrote this:
Open the root of the hard drive in the file browser. Right click on the tmp folder, select the last item in the menu (probably 'Properties', but I can't be sure because I don't use an English language setup), click the third tab in the Properties window of tmp (most likely named 'Permissions') and look at the window. Are the owner/group both root? Are the nine option flags on the next three lines all set? Is the sticky bit set?
So /tmp needs to have all options (read, write, execute) set for owner, group and other and the sticky bit must be set as well.

Edit: wait a moment - it's possible the display of the file browser's properties window you are presented with doesn't look the same as what I'm looking at, so the description above may be unclear (and the 'sticky bit' may not even be visible in that window). I think we'd better do this from the terminal, but in order to do that I need to know what the hard drive's mount point is when you boot from cd/usb. If you open a terminal window and enter mount, what is the resulting output?
Locked

Return to “Other topics”