LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2011, 02:57 PM   #31
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled

After you executed the chroot-command, are you sure that it did not work? how did you see that? I mean independently of the message that /bin/bash was not found.

Markus
 
Old 06-21-2011, 03:25 PM   #32
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I didn't.
Can you please give me a way to find that out ?
Thanks
 
Old 06-21-2011, 03:48 PM   #33
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
mh, if chroot has worked you can execute for example
Code:
ls /home
and it should show the files in the /home directory of your damaged system.

Markus
 
Old 06-21-2011, 05:01 PM   #34
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Oh I know understand what chroot does...
but no, unfortunately it shows the live cd content.
 
Old 06-22-2011, 07:18 AM   #35
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Any other ideas ?
 
Old 06-22-2011, 07:44 AM   #36
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
you should read the documentation of apt-get. I know that some packagemanagers can install packages with an option like "other root" which means that the root of the directorytree where a package is to be installed is not /
If apt-get has such an option you can reinstall packages from the live-CD to your damaged system (without chrooting).

Hopefully someone how is experienced with Ubuntu or Debian reads this and can tell you if this would work.

Markus
 
Old 06-22-2011, 08:09 AM   #37
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
The thing to remember is that, when you boot from a live CD, the "root" is that of the live CD and, pragmatically speaking, you don't need to change that. What you need to do, in order to get the system up-and-running again, is to manually re-create the necessary files ... or, simply, to repeat the installation. Installers are smart enough to recognize when there's already a system in place where they're installing.

I don't mean to sound condescending when I say, "this isn't complicated ... don't make it complicated."
 
Old 06-22-2011, 11:53 AM   #38
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I'm sorry but I don't really understand what you mean sundialsvcs. What is it that I should do from here, exactly ?
I assume that the main issue is due to the fact that the init file is not found. Can't I recreate it, and thus manage to boot from my hard drive ? From there, it should be much easier to reinstall whatever has been deleted in the bin directory, for example...
 
Old 06-22-2011, 12:04 PM   #39
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Well, you didn't tell us that the init-file isn't found, how can anyone tell you what to do if he hasn't enough information?

BTW, in this thread there are several posts where people explain in great detail what you can do. We cannot spare you reading the Manuals.

Markus
 
Old 06-22-2011, 02:57 PM   #40
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Yes I did, I said it in the very first post. I think it's the reason why there is a kernel panic and the os doesn't boot.
How can I check for sure if it's really missing or corrupted (where is it supposed to be, and what's supposed to be inside?), and how to repair or recreate it, in case you think it might help to solve my problem (I don't know, I'm not an expert, I'm just throwing out this idea but maybe it's not related at all) ?
 
Old 06-22-2011, 03:05 PM   #41
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Well, since init resides (should be there) in the /sbin directory, could you please post the contents of your /sbin directory? what I mean is the output of
Code:
ls /mnt/ubuntu/sbin
Markus
 
Old 06-22-2011, 03:28 PM   #42
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Hi again, the output of the command ls /mnt/ubuntu/sbin is:
Code:
acpi_available   fsck.nfs           mii-tool          resize2fs
alsa             fsck.reiserfs      mkdosfs           resize_reiserfs
alsactl          fsck.vfat          mke2fs            restart
alsa-utils       fstab-decode       mkfs              rfkill
apm_available    getty              mkfs.bfs          rmmod
apparmor_parser  halt               mkfs.cramfs       route
badblocks        hdparm             mkfs.ext2         rtacct
blkid            hwclock            mkfs.ext3         rtmon
blockdev         ifconfig           mkfs.ext4         runlevel
bootlogd         ifdown             mkfs.ext4dev      sfdisk
brltty           ifquery            mkfs.minix        shadowconfig
brltty-setup     ifup               mkfs.msdos        shutdown
cfdisk           init               mkfs.ntfs         slattach
crda             initctl            mkfs.reiserfs     ss
ctrlaltdel       insmod             mkfs.vfat         start
debugfs          insserv            mkhomedir_helper  startpar
debugreiserfs    installkernel      mkreiserfs        start-stop-daemon
depmod           ip                 mkswap            status
dhclient         ip6tables          modinfo           stop
dhclient3        ip6tables-restore  modprobe          sulogin
dhclient-script  ip6tables-save     mountall          swapoff
dmraid           ipmaddr            mount.fuse        swapon
dmraid-activate  iptables           mount.ntfs        switch_root
dmsetup          iptables-restore   mount.ntfs-3g     sysctl
dosfsck          iptables-save      mount.ntfs-fuse   tc
dosfslabel       iptunnel           nameif            telinit
dumpe2fs         isosize            on_ac_power       tune2fs
e2fsck           iwconfig           pam_tally         udevadm
e2image          iwevent            parted            udevd
e2label          iwgetid            partprobe         umount.hal
e2undo           iwlist             pccardctl         umount.udisks
ethtool          iwpriv             pivot_root        unix_chkpwd
fdisk            iwspy              plipconfig        unix_update
findfs           kbdrate            plymouthd         upstart-udev-bridge
fsck             killall5           poweroff          ureadahead
fsck.cramfs      ldconfig           rarp              vstp
fsck.ext2        ldconfig.real      raw               wipefs
fsck.ext3        logsave            reboot            wpa_action
fsck.ext4        losetup            regdbdump         wpa_cli
fsck.ext4dev     lsmod              reiserfsck        wpa_supplicant
fsck.minix       lspcmcia           reiserfstune
fsck.msdos       MAKEDEV            reload
 
Old 06-23-2011, 10:49 AM   #43
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
So as you can see, init is there. But is it corrupted ?
 
Old 06-23-2011, 10:58 AM   #44
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Why don't you perform a new installation from the Live-CD? If you do this without deleting your old installation and without formatting the partition you should have your system repaired afterwards and the configurations in your user's homedirectory will still be there.

Nobody can tell you if your init is corrupted or what else is damaged.

Markus
 
Old 06-24-2011, 02:39 AM   #45
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
But I would have to reinstall all my programs, wouldn't I?
This can take a very long time, between the time to download each of them, and compiling them if necessary. Plus I'd have to make a list of all my programs, etc. I'd really like to avoid coming to that.

Is there really no solution to repair a Unix system without reinstalling it ?

If the rm command is not random, I'm sure you can exactly tell what is damaged. I just did a rm -R because I wanted to delete a directory, while forgetting for a split second that the system that was mounted on it would be deleted too. If rm removes alphabetically or in a specific order, you should be able to know what's been deleted and what needs to be copied back into the system.

Last edited by elishac; 06-24-2011 at 02:41 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tried to repair - lost Linux davholla Linux - Newbie 5 08-24-2011 05:51 AM
I need a Linux OS other than Ubuntu which has a repair disk or repair software jhmac77 Linux - Newbie 1 03-17-2008 07:04 AM
how to repair linux o/s amit.mitu Linux - Newbie 2 12-19-2007 08:29 AM
Repair NTFS partition from linux nyk Linux - Software 3 10-27-2004 03:27 PM
bootable repair linux distribution ViralHex Linux - Distributions 2 08-08-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration