Ubuntu 7.04, Deleted 'vmlinuz' What to do?

Status
Not open for further replies.

aditya.shevade

Console Junkie
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

Debian Rocks!
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
 

freebird

Debian Rocks!
^ 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.
 
Last edited:
OP
aditya.shevade

aditya.shevade

Console Junkie
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.
 
Last edited:

freebird

Debian Rocks!
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.
 
OP
aditya.shevade

aditya.shevade

Console Junkie
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

El mooooo
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
 
Status
Not open for further replies.
Top Bottom