LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 03:57 PM   #31
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850

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, 04: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, 04:48 PM   #33
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 06: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, 08:18 AM   #35
elishac
Member
 
Registered: Nov 2009
Posts: 522

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

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 09:09 AM   #37
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,177

Rep: Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209Reputation: 2209
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, 12:53 PM   #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, 01:04 PM   #39
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 03: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, 04:05 PM   #41
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 04: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, 11: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, 11:58 AM   #44
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 03: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 03:41 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06: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 08:04 AM
how to repair linux o/s amit.mitu Linux - Newbie 2 12-19-2007 09:29 AM
Repair NTFS partition from linux nyk Linux - Software 3 10-27-2004 04:27 PM
bootable repair linux distribution ViralHex Linux - Distributions 2 08-08-2004 02:31 AM


All times are GMT -5. The time now is 12:52 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration