DIGIT-ARC read-only archive · snapshot: July 23, 2026

Ubuntu 7.04, Deleted 'vmlinuz' What to do?

11 posts · originally from https://geek.digit.in/community/threads/ubuntu-7-04-deleted-vmlinuz-what-to-do.55893/

aditya.shevade
aditya.shevade Original post #1
Apr 23, 2007 at 6:44 PM
Hi

I have OpenSuSE 10.2 and Ubuntu. I was playing with SuSE's xen and accidentally deleted the vmlinuz file of Ubuntu. And now obviously I am not able to boot in.

Is there any way to restore the file? Without entire system re installation? Then please tell me. Or can someone send me the file through email? If they work the same for all PCs which I doubt they do not.

Aditya
freebird
Apr 23, 2007 at 7:15 PM
You need to chroot-change root (from suse) and do a apt-get install linux-image-(version) --reinstall to get everything file.if u have a seperate /boot partn u need to mount it inside ubuntu's root(/) partn's /boot directory.also be sure to mount it as rw.



ps:i'll post in detail later
aditya.shevade
Apr 23, 2007 at 7:18 PM
^^ Yeah, details would be better. I don't want to screw up.
freebird
Apr 23, 2007 at 7:20 PM
^ sure u can repair it.dont fret.I'll post in some 30 minutes sorry :))
OK.

First know ur ubuntu partition using fdisk -l command.
do u have a /boot partn?
I assume u dont have seperate partition for /boot? also use root permission doing following:
so:
First mount ur ubuntu "/" partn say we assume it as /dev/sda7 here.
mount it.
Code:
~$sudo  mount /dev/sda7    /mnt
==assumin u have a /mnt dir.
now chroot:
Code:
@ubuntu:~$sudo chroot  /mnt/      /bin/bash
now ur chrooted,ie ur now working in Ubuntu but using Suse's Linux kernel for temp use and from Open SUse.
Code:
~#mount /proc/
Code:
~#apt-get install linux-image-2.6.xxx    --reinstall
afterwards umount /proc;type exit or CTRL+D.now go to /mnt/boot/ folder(ubuntu) make sure ur vmlinuz,initrd etc are there.
if u have a seperate /boot for ubuntu clarify as it needs that u mount the /boot partn inside /boot dir of mounted ubuntu @ /mnt/boot
Hope u get.
aditya.shevade
Apr 23, 2007 at 8:59 PM
Thanks man. Will try it out, actually doing it right now. And it seems to be working.

And by the way also tell me how to change the permissions of partition of ubuntu (mounted as /ubuntu) and make it read only. Using the command line. I know the GUI way.
vignesh
vignesh #6
Apr 23, 2007 at 9:15 PM
chmod 755 /ubuntu -R
aditya.shevade
Apr 23, 2007 at 11:44 PM
thanks. I need to get a good book/ebook/any document on shell commands.
freebird
Apr 24, 2007 at 1:42 AM
there is no need to set permissions.just follow the commands from a host operating system;in this case i think u got suse linux also.else u can use a live cd distro and get it mounted too.sometimes some distros auto-mount ur other partns including ubuntu;that doesnt matter.
vignesh
vignesh #9
Apr 24, 2007 at 1:48 PM
www.tldp.org

*www.thinkdigit.com/forum/showthread.php?t=42049
aditya.shevade
Apr 24, 2007 at 1:52 PM
freebird said:
there is no need to set permissions.just follow the commands from a host operating system;in this case i think u got suse linux also.else u can use a live cd distro and get it mounted too.sometimes some distros auto-mount ur other partns including ubuntu;that doesnt matter.

No no... You got me wrong. I did what you said, and Ubuntu is running fine. I want the partition to be read only so that I don't delete files by mistake the next time I am doing anything.
eddie
eddie #11
Apr 25, 2007 at 1:36 AM
You should edit your fstab file and change the permissions to ro in there. That will make the permissions on /ubuntu folder permanent until you change it again in fstab