Sponsored Content
Top Forums UNIX for Advanced & Expert Users Mistakenly renamed libdl.so: system got corrupted Post 302484321 by Corona688 on Thursday 30th of December 2010 02:55:11 PM
Old 12-30-2010
I believe ubuntu comes with busybox. If ubuntu's version of busybox is compiled statically, it will provide a minimal shell and minimal toolset without any libraries. ...which is kind of the point of having it, so I hope so.

On my Gentoo system, /bin/bb is a minimal shell, and /bin/busybox can be used to call the builtin programs:
Code:
$ /bin/busybox
BusyBox v1.15.3 (2010-12-30 13:47:04 CST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as!

Currently defined functions:
	[, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk,
	basename, bb, bbconfig, bbsh, beep, blkid, brctl, bunzip2, bzcat,
	bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd,
	chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond,
	cryptpw, cttyhack, cut, date, dd, deallocvt, delgroup, deluser, depmod,
	devmem, df, dhcprelay, diff, dirname, dmesg, dnsdomainname, dos2unix,
	dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
	envdir, envuidgid, ether-wake, expand, expr, false, fbset, fdflush,
	fdformat, fdisk, fgrep, find, findfs, flash_eraseall, flash_lock,
	flash_unlock, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, fuser,
	getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head, hexdump,
	hostname, httpd, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd,
	ifup, init, insmod, install, ionice, ip, ipaddr, ipcrm, ipcs, iplink,
	iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd,
	last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap,
	logger, login, logread, losetup, lpq, lpr, ls, lsattr, lsmod, lzmacat,
	lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,
	mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap,
	mktemp, modprobe, more, mount, mountpoint, mt, mv, nameif, nc, netstat,
	nice, nmeter, nohup, nslookup, openvt, passwd, patch, pgrep, pidof,
	ping, ping6, pipe_progress, pivot_root, pkill, popmaildir, poweroff,
	printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead,
	readlink, readprofile, realpath, reboot, reformime, renice, reset,
	resize, rm, rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv,
	runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch,
	setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh,
	sha1sum, sha256sum, sha512sum, showkey, sleep, softlimit, sort, split,
	start-stop-daemon, stat, strings, stty, su, sum, sv, svlogd, swapoff,
	swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tee,
	telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr,
	traceroute, true, tty, ttysize, tunctl, udhcpc, udhcpd, umount, uname,
	uncompress, unexpand, uniq, unix2dos, unlzma, unlzop, unzip, uptime,
	usleep, vconfig, vi, vlock, volname, watch, watchdog, wc, wget, which,
	who, whoami, xargs, yes, zcat, zcip

$ ls -l /bin/bb
lrwxrwxrwx 1 root root 7 Dec 30 13:48 /bin/bb -> busybox
$ ldd /bin/busybox
        not a dynamic executable
$ /bin/bb
~ # /bin/busybox touch file
~ # /bin/busybox ls -l file
-rw-r--r--    1 root     root            0 Dec 30 13:52 file
~ # /bin/busybox mv file file2
~ # /bin/busybox ls -l file2
-rw-r--r--    1 root     root            0 Dec 30 13:52 file2
~ #

If you have a shell and nothing else, this might be able to save you. If not, you might be able to boot with "init=/bin/bb", maybe.

Otherwise, you're back at the livecd option.

Last edited by Corona688; 12-30-2010 at 04:01 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

mistakenly issued crontab -r

HPUX 11 (32bit) An ordinary user (not root) had mistakenly issued "crontab -r" which removed the crontab file corresponds to his user_id. (well, on our keyboard R is next E, where "crontab -e" is to edit the crontab file) :( Is there any way to recover the removed crontab file by that... (2 Replies)
Discussion started by: kanang
2 Replies

2. Shell Programming and Scripting

duplicate index names renamed

Hello everyone ! Please have a minute and see if you know how to script this I have a file like this: "create table .... ... create index n112 on ... ... create table ... .... create index n113 on... ... create table ... create index n112 on ...! duplicate ... (1 Reply)
Discussion started by: sotoc79
1 Replies

3. Shell Programming and Scripting

rsync - update file on backup when file renamed on source

hi all, Please help me with rsync. I configured rsync to preserve timestamps using the -a option. When i renamed fileA to fileB on source machine I have to copies at the backup server. The aim is to keep the most recent file. fileA & fileB has same contents. When i renamed fileB to... (2 Replies)
Discussion started by: coolatt
2 Replies

4. UNIX for Advanced & Expert Users

Critical lib renamed

Hello I have moved a critical lib from its location, so all programms linked to libc dont work . I still have two shells on the machine, bash and ksh The only thing I see is copying back the lib, but of course : dd, cp , mv etc are dead . So i tryed a loop with read ... {^Jwhile read... (24 Replies)
Discussion started by: remi75
24 Replies

5. Solaris

Renamed lib directory by mistake

Let's say someone accidentally renamed the lib directory in Solaris 8, and now they cannot get into the terminal or even rename the folder via file manager.What would one do? (37 Replies)
Discussion started by: jetjaguar
37 Replies

6. Solaris

UFS File System Periodically Corrupted - What to check?

The system is a SunFire V440 running SunOS 5.10 About once every 3-4 weeks, the system will reboot into single user mode on its own, and then I run svcs -xv, the filesystem service and dependent services will be disabled due to the metadisk file system being corrupted. The I've been doing... (2 Replies)
Discussion started by: the.gooch
2 Replies

7. Solaris

recover a corrupted solaris10 system /usr/lib

did something very dump under /usr/lib, eg: overwite a bunch of files from a similar system's /usr/lib, while the system is live.. I have no backup on this..it crashed...and came up with a bunch of device driver load errors and hung... This is Solaris10 update 7 .. I wonder if I could do a... (0 Replies)
Discussion started by: ppchu99
0 Replies

8. Shell Programming and Scripting

who renamed my executable

Hi All, I connected via rlogin in testing environment (ksh ) and placed an executable with -rwxr-xr-x permission. eg: from my own unix box used : rlogin host -l user But the exe was renamed by somebody. since it's only renaming none of the access time , modification time etc is altered.... (2 Replies)
Discussion started by: blackcat
2 Replies

9. Shell Programming and Scripting

Renaming file and check for the renamed file existence

Hi Am trying to move a file from one name to another When I do "ls" to check for the moved filename I can see the file but when I try the same with a script am unable.. I think am doing some pretty silly error.. please help.. toMove=`ls | grep -E "partition.+"` mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

10. Ubuntu

Renamed Volume Group name on Webmin while running samba server (oops)

Hi...I'm new to Linux and was working on a home server. I have it operational with Samba Share as my NAS system. Unfortunately, while I was on Webmin I changed the Logical Volume Group Name and now I can't find the data I had saved on my Samba Server. Can anyone help me recover those files? ... (0 Replies)
Discussion started by: pangil
0 Replies
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy