Slashdot Mirror


System Recovery with Knoppix

An anonymous reader writes "This article shows how to access a non-booting Linux system with a Knoppix CD, get read-write permissions on configuration files, create and manage partitions and filesystems, and copy files to various storage media and over the network. You can use Knoppix for hardware and system configuration detection and for creating and managing partitions and filesystems. You can do it all from Knoppix's excellent graphical utilities, or from the command line."

41 of 270 comments (clear)

  1. Oldie but a goodie by ozmanjusri · · Score: 5, Informative

    This one's been around for a while. It's a useful resource, but some of the more specialised distros are easier to use for rescue disks.
    http://www.frozentech.com/content/livecd.php has a good list of them.

    --
    "I've got more toys than Teruhisa Kitahara."
    1. Re:Oldie but a goodie by Rolo+Tomasi · · Score: 4, Informative

      FWIW, there's also a dedicated rescue distro based on Knoppix and Damn Small Linux - INSERT.

      --
      Did you know you can fertilize your lawn with used motor oil?
  2. There are many other alternatives by auzy · · Score: 4, Informative

    You can also use the gentoo live CD (you can even get an experimental one for reiser4) at www.gentoo.org.

    There are also lots of speecialised ones. generally, the only time a linux box wont boot though is just a lilo or grub problem...

    By the way, the coralised link is: http://www-106.ibm.com.nyud.net:8090/developerwork s/linux/library/l-knopx.html?ca=dgr-lnxw01-obg-Sys Recover

    1. Re:There are many other alternatives by Anonymous Coward · · Score: 1, Informative

      Generally, the only time a linux box wont boot though is just a lilo or grub problem... Or when the file system is corrupt.

    2. Re:There are many other alternatives by Stevyn · · Score: 2, Informative

      Um??? The gentoo live CD is just to install gentoo. All it contains are portage files and source tarballs for installing software. There is even the minimal CD that only contains a working kernel and the least amount required to start the installation.

      They called it a live CD, I guess, because you can boot into a console unlike some other distro's installations. But I don't think they intended for it to be used as a recovery for systems other than gentoo.

      I've only used it as a recovery once when I compiled a kernel that wasn't configured properly and I over wrote the working kernel. However, I still had to mount all the partitions and chroot into my system from the live cd.

  3. Re:So you can fix Linux.... by rixdaffy · · Score: 4, Informative


    I think NTFS is probably read-only so you can't fix it directly. But in case you weren't smart enough to keep backups around, you can use Knoppix to backup your files over the network. I did the same thing for a friend who couldn't boot up her XP installation anymore after Norton Antivirus "cleaned" a bit too much (even safe mode didn't work). But I ended up copying the data to an external firewire disk 'cause the network (which Knoppix didn't have any problems to detect) was too slow.

    Go Linux/Knoppix!

    Ricardo.

  4. Re:Yes, but.... by Anonymous Coward · · Score: 5, Informative

    For those not in the know, "Knoppix is a GNU/Linux distribution that boots and runs completely from CD." (Source: www.knoppix.net).

    So it is kind of hard for a Knoppix installation to become corrupt; worst case scenario is you just burn new copy of the Knoppix CD. :-) The parent comment is in fact funny (and quite so!), rather than insightful as it's currently moderated. ;-)

  5. Yes, you can: knx-hdinstall by RealProgrammer · · Score: 5, Informative

    "You can't install it to your hard drive."

    Yes, you can: knx-hdinstall.

    --
    sigs, as if you care.
    1. Re:Yes, you can: knx-hdinstall by ISayWeOnlyToBePolite · · Score: 3, Informative

      knx-hdinstall is not maintained and should no longer be used. knoppix-installer is the way to go. www.knoppix.net/docs/index.php/HdInstallHowTo

  6. Re:What I like... by Anonymous Coward · · Score: 2, Informative

    Is that IBM has done this, right off their own website and helping the system admins, techies and anyone else interested in learning how to fix your defunct or otherwise broken system

    Google for some more articles by the same author. There are gems there.

  7. Re:So you can fix Linux.... by kazoosandinstruments · · Score: 4, Informative

    captive-ntfs 1.14 works just fine for me w/Knoppix 3.4 (though 1.15 w/Knoppix 3.6 failed to mount my NTFS partitions, that is another story altogether) ... so, you can actually read/write to NTFS from Knoppix if you manually configure captive and mount the NTFS partition(s) yourself.

  8. Comment removed by account_deleted · · Score: 2, Informative

    Comment removed based on user account deletion

  9. Re:So weird... by Anonymous Coward · · Score: 1, Informative

    I just did this tonight, but with an age old debian iso. XP overwrote my MBR, but all it took was a chroot so I could run lilo.

    It was the strangest thing. By all outward experiences XP was behaving properly but it wouldn't dhcp, or ping. Took a complete reinstall to fix. I wish there was a Winoppix to help me fix that, there just aren't the troubleshooting options there should be on windows. It could be my ignorance, but the cable guy was stumped too.

  10. Re:Yes, but.... by the_shaitan · · Score: 5, Informative

    Umm... Knoppix can be installed on to the hard disk and many people actually do so because then they get a Debian-like OS on their hard-disk.

    Knoppix itself ships with a hard-disk install script. See this page for more info - http://www.knoppix.net/docs/index.php/HdInstallHow To

    Regards,
    The Shaitan

  11. I just used Damn Small Linux to overhual a Susebox by pair-a-noyd · · Score: 4, Informative

    A friend brought me his machine to upgrade.
    A Frys cheapo Linux special, originally it came with a 30g, 128m ram and Thiz Linux. I Thized the disc straight into the trash and installed Suse 9.0 on it for him when he first got it.

    Well, as time went on he realized that his system needed upgrading. So I sent him to the store and he brought back another 128m ram, a 120g drive and Suse 9.1 Pro.

    The plan was to have the old doggy 30g as his boot/OS/work drive (hda) and his new 120g as /home (hdb)....

    Well, booting up 9.1 does not come up and say
    "Hey, I see you have data on your drive already and a new blank drive. Would you like to move it around in anyway before we procede?"

    No, Suse just suggests that you wipe everything out and start over. Even if you tell it you want to do an upgrade, it has NO PROVISION what-so-ever to allow you to format the new drive then move your old /home from hda to hdb then reformat hda and partition it up in a useful way.

    Ok, so in light of this, I took Damn Small Linux 0.8.2
    and booted up. Opened a root terminal, fdisked hdb, formated it for ext3 then moved all of his old /home data from hda to hdb.

    It copied EVERYTHING. Hidden files, configurations, email, cookies, bookmarks, music, photos, the whole works.

    When it was done I booted into Suse 9.1 pro, did a NEW INSTALLATION and wiped hda clean, installed the OS on it and told it that /home is on hdb1.

    I created the same user and password as the old system so Suse looked at the /home on the new 120g drive and asked me if I wanted to change the permissions and ownership over. I said yes.

    The install proceded normally to completion.
    When it was finished and I rebooted the system, it was identical to the way it was brought to me except that he now has a 120g /home directory instead of the 10gigs he had before.

    Damn Small Linux is the very best tool a tech can carry with him. I keep a copies on biz cards in all of my tool boxes and in each of my vehicles.
    I don't leave home without it.

    I also carry standard Knoppix in case I run into a case where I need k3b on the ailing machine.
    I have several other versions of Knoppix I keep handy for various network jobs, like knoppix-std
    and a few other network related Knoppix knock offs..

  12. One thing your missing.. by msimm · · Score: 5, Informative

    As a computer networking student I'm absolutely AMAZED this hasn't gotten more attention then it has.

    Under your MS stuff (I know, I know, but in industry it really is a necessary evil) you should definitely have a Windows Boot CD. And I don't mean a DOS floppy! Its basically a live, say Windows XP disk with preinstalled software (virus scan, adware removers, registry editors, complete networking setup). It really has all the tools you commonly use when fixing the obligatory windows box and probably a few you've never even known you'd need.

    I highly recommend you build one, and if the directions sound a little complicated, just take your time and reread them, there's about 3 step and none of the are actually complicated.

    The worst thing you can do is boot a infected PC from an infected hard drive, not to mention the trouble accessing NTFS with FULL read-write.

    --
    Quack, quack.
    1. Re:One thing your missing.. by mattOzan · · Score: 2, Informative
      The Windows Boot CD is based on Bart Lagerweij's PE Builder. Go to the BartPE website to learn how to brew your own customized Windows Boot CD.

      There are scads of folks out there busily building their own add-ons and plugins for the BartPE environment which you can just download and include in your own installation- everything from Java Runtime to Citrix ICA client to Trillian. And literally a hundred more.

      I've found it an indispensible Windows recovery tool. I can boot off the CD and run Adaware, Spybot and McAfee scans on the system hard drive, removing all the IE trojan nonsense before it starts up and get resident in memory. I can connect to network shares and transfer data from machines that won't boot.

      You don't even have to boot from the CD- it will autorun in an active Windows XP session and give you the same NU2 menu. So it can be used to run applications locally that you don't want to install on the client's machine.

  13. Re:Knoppix is good, but MEPIS rocks! by Kethinov · · Score: 3, Informative
    Yeah, cos using the Knoppix "Install to Hard Drive" menu option and waiting is difficult.
    Have you ever actually DONE a Knoppix hd install? Sure the install is easy, but have you ever actually used a hard disk installed knoppix system? It always results in broken apt. And no matter how many times I've tried to beat a knoppix hdinstall's apt into submission to TRULY convert it into Debian, I simply can't.

    Knoppix is a great livecd, but a horrible installer. It's less trouble to just install straight Debian.
    --
    You're right, I wouldn't steal a car. But if it were possible, I sure as hell would download one!
  14. Re:Yes, but.... by Anonymous Coward · · Score: 2, Informative

    I have four Knoppix hard drive installs around the house. Love it and have set it up for a half dozen former Windows uers.
    But although I do love Knoppix, DSL has come a long way with its on-line install program that lets you basically customize your distro from almost scratch. Why Knoppix still refuses to pack the Nano editor still escapes me. Emacs is way too overweight for little setup script editing on the command line.
    Just this weekend I replaced a dying notebook system that was dual booting SUSE and Win2K with DSL and all the problems went away.
    The downside with DSL is no info or man pages. You can get the man pages once you're on-line, but no info pages? That's kinda fucked up. How can you tell someone to RTFM when they stripped it out?

  15. Re:I just used Damn Small Linux to overhual a Suse by pe1chl · · Score: 4, Informative

    I think you could have added the new disk to the old running system, fdisk and format it using yast or commandline tools, move your home there, and then re-install the system on the 30GB disk.
    I would have done:
    - login as root
    - cd /
    - mv home home.orig
    - mkdir home
    - yast
    (add the disk, say it will be /home, format it)
    - df
    (make sure the /dev/sdb1 is now mounted as /home)
    - mv /home.orig/* /home
    - rmdir /home.orig

    home is now on the new disk.
    reboot system from CD, install 9.1 on 30GB and during partition selection tell it that /home is /dev/sdb1.
    that should do it.

  16. First rate device detection by Anonymous Coward · · Score: 5, Informative

    Luckily I haven't had to use Knoppix to recover any crashed systems...

    However I did use it to tweak the device settings on my install of FreeBSD. Knoppix has always detected anything I threw at it, while FreeBSD isn't quite up to the same level (but getting better). So, I gave Knoppix a whirl and got enough driver info for the noname videocard that shipped in the used computer I was setting up as a server.

    Rock on Knoppix!

  17. Re:Security?!?!? by ticktockticktock · · Score: 2, Informative
    One would need many minutes long work to open the cases and reset the bioses especially if they don't know the specific mobo.

    They wouldn't even have to open the case if they know some BIOS override passwords.

  18. Also... by RWerp · · Score: 2, Informative
    --
    "Long run is a misleading guide to current affairs. In the long run we are all dead." (John Maynard Keynes)
  19. Re:Yes, but.... by Anonymous Coward · · Score: 1, Informative
  20. BitTirrent of KNOPPIX_V3.6-2004-08-16-EN-Live-CD by leon.gandalf · · Score: 0, Informative

    http://home.earthlink.net/~leon.gandalf/KNOPPIX_V3 .6-2004-08-16-EN-Live-CD.torrent/
    If you have not tried Knopix Live CD, here is a BitTorrent link.
    If anyone has a Bittorrent to 3.7 POST IT... :)

  21. Better safe than sorry by Deorus · · Score: 5, Informative

    First of all, there are a couple of basic steps people can take to ensure their systems are rescuable and secure regardless of any patches they have applied.

    • Make sure your root filesystem is as small as possible to minimize the chances of corruption there and that you can have it mounted read-only. This not only improves your security (since you can simply remove CAP_SYS_ADMIN from all your daemons and they won't be able to remount anything), but also makes it even harder to corrupt the root filesystem. Your user and group information files will need to be moved to /var and appropriate symbolic links created in /etc so that users can still change user and group passwords and you can create accounts without remounting the root filesystem read-write.
    • Never remove your legacy device inames from /dev, ever! Even if you use devfs or udev, a new /dev is mounted over the original one, so the legacy inames disappear magically from VFS. The legacy device inames may come in handy in a system recovery later. If you use devfs or udev, make sure your /dev filesystem is mounted with the noexec option enabled for security reasons.
    • Make sure your /var is always mounted noexec and nodev. If you use qmail, switch to Postfix (yes, I've done it, DJB is such a dumbass with his lack of respect for standard directory hierarchies).
    • Make sure your /tmp is not in your root filesystem. You can mount a tmpfs for your /tmp and point /usr/tmp, /var/tmp, and /anything-else/.../tmp to your /tmp with a symbolic link. If you do mount a tmpfs or any other kind of filesystem, make sure you do it with the noexec and nodev options enabled. If you can't or are not willing to use another filesystem for /tmp (tmpfs sometimes is too small for CVS, and you may not have enough space for a dedicated /tmp), use /var/tmp instead (assuming you've mounted /var according to my instructions above).
    • Grab a copy of the GNU fileutils from a mirror close to you, compile it statically, and install the resulting binaries in /sbin (not /bin). If anytime later something terrible happens to your libc, you can always make /sbin have precedence over /bin in your $PATH and use the static binaries in /sbin instead for recovery. Always remember to make add /sbin first in your $PATH if you ever upgrade your libc from the sources, especially if it is your first time doing so (believe me, everyone I know, including me, had problems with their first libc installations from the source). Doing this can save you from a lot of trouble.
    • Even when you know your kernel binary will boot perfectly (because perhaps you used the same configuration file to compile the same kervnel version), make a backup of your old kernel by renaming (not copying) it and specifying the new name in lilo.conf. LILO knows nothing about filesystems (never used grub, so I can't talk about it, but I suspect the same thing happens with it), so if your kernel, for some reason, gets fragmented in your filesystem, you will be in trouble to boot from it, since LILO assumes the kernel is never fragmented.

    Following above steps is usually enough to prevent rescue situations because the root filesystem is vital, so protecting it is the first line of defense, but if the worse comes to worst and you ever get into trouble, you must learn with the problem. If the kernel loads and init doesn't, it may be a libc problem. Try booting with init=/bin/sh, remount your filesystems read-write, examine the problem, umount them (or remount them read-write, when unmount is not possible), sync, reboot and watch the changes. If the kernel does not load, you may need a

  22. Re:So you can fix Linux.... by dmaxwell · · Score: 4, Informative

    captive-ntfs needs a captive user and group to work properly. Manually adding them allows it to work correctly again on 3.6. I even made a personal remaster of Knoppix with fix and the XP drivers captive-install-acquire already done. That last is handy because I have had NICS that XP didn't recognize and it gets the driver install files on the disk.

  23. knoppix HDIsntall sucks by mekkab · · Score: 2, Informative
    You USED to be able to install knoppix to a HD...

    however if you read the FAQ on the new version of knoppix, they explicitly state
    Q: Can one also install the distribution from the CD onto a hard drive?

    A: In principal, yes (after all, the "master" system also runs on a hard
    drive before it is burned to CD). However there is currently no
    installation GUI for this, so installation to a hard drive should probably
    only be attempted by more knowledgeable Linux users.

    ...

    .) Reboot, try the system out, fix any broken settings.
    (No guarantees.)
    Which is all well and good; if you speak/read German. Otherwise you get a bunch of errors in German that you can't decipher.

    Instead, I installed slackware.
    --
    In the future, I would want to not be isolated from my friends in the Space Station.
    1. Re:knoppix HDIsntall sucks by emj · · Score: 3, Informative

      It works perfectly, I'm writing this on a laptop where Knoppix was installed. It autodetected everything and installed faster tahn any distro I have ever seen.

      With a good GUI as well, letting me choose alot of diffrent options.

  24. Re:But what about winmodem support?- yup! by anon+mouse-cow-aard · · Score: 2, Informative
    That article is over a year old things have changed significantly:
    • article claims all knoppix is german by default. No, there are two flavours of images you can download -EN (English) and -DE (deutsch umm that's german in german to non german speakers :-) ).iso
    • talks about 3.2 (understandably). 3.6 is out, and it includes kernel 2.6.7, (you have to invoke knoppix26 on the command line) which is pretty close to the latest and greatest.
    • in 3.6, there are softmodem drivers. Some of them are truly free, others are free versions of linuxant drivers, which are limited to 14.4 kbps (you pay for a license key to run at full speed.) They work (this was on a redhat 8 system, though.)
  25. Re:So weird... by Filmwatcher888 · · Score: 3, Informative

    There is a sort-of Winnopix available. It's called BartPE. It's a CD bootable version of WinXP that lets you add almost any software package. YOu can use it for data recovery, forensics or as a temp OS. YOu can find it here.

  26. Re:Tom's by Krunch · · Score: 2, Informative

    And it fits on a floppy so you can boot it on your CD reader-less computers too.

    --
    No GNU has been Hurd during the making of this comment.
  27. slashdotted? by Krunch · · Score: 3, Informative
    Our apologies...
    The IBM developerWorks Web site is currently under maintenance.
    Please try again later.

    Thank you.
    Here is the Google cached version.
    --
    No GNU has been Hurd during the making of this comment.
  28. Re:So you can fix Linux.... by nolife · · Score: 2, Informative

    I have been using a scaled down version of a Linux recovery CD at work. I use it at least once a week to backup data from a non booting XP/W2K computer. Even if the person only needs Favorites and My/ Documents, it provides a method for recovery that my Microsoft stacked IT department did not have before.

    It is not as robust as Knoppix but simple, quick and to the point.

    Boot with CD, start the network through an included script, manually mount the Win partition, manually mount the network share, run MC and copy off what you need. I know that does not sound exciting and sexy but if you know the commands and what you need to mount and where, it is a faster process then booting up Knoppix and using the GUI.

    I believe the iso I am using is from here. I am not completely sure as I've been using the same thing for over a year now and at the time, I downloaded several different recovery iso's to test them out (kind of makes my entire post useless if I can not reference what ISO I actually use ;)). I picked this one because it was the easiest and quickest to use for what I need, at around 25MB is was relatively small also.

    --
    Bad boys rape our young girls but Violet gives willingly.
  29. ACPI, Mepis, hardware and configuration ease. by twitter · · Score: 2, Informative
    Does Mepis support ACPI Suspend/hibernate out of the box?

    That depends on what version you use and what kernel you install and what hardware you have. Some laptops, such as my Thinkpad T600, have notoriously buggy BIOS. Both ACPI and APM in newer kernels work well using Sarge. The same packages, of course, are available for Mepis and Mepis is easier with new hardware. The upshot is that you can install the last stable release of Mepis, knock out everything but Sarge from /etc/apt/sources.list, and get a nifty version of Sarge that has Spam Assassin for Kmail, MANY funky hardware drivers and MANY working commercial goodies like flash and real player configured and working. Mepis, especially the release candidates, does a very good job configuring newer hardware and can be used to test and repair X configurations.

    The only downside to Mepis is that it instals freaking EVERYTHING. I don't need Apache and MySQL on my laptop, so I'd have to spend some time removing those and other packages. Also, I hate flash and prefer that my browser ignore it 99% of the time. That too takes some time. For an older laptop, Sarge works better for me. Mostly, hardware support is a kernel function and newer kernels do it better. The kernels available in Sarge are generally good enough and the install works.

    --

    Friends don't help friends install M$ junk.

  30. Knoppix can virus-scan Winduhs by Anonymous Coward · · Score: 1, Informative

    How To Do A Virus Scan With Knoppix
    Starting with 3.4, it comes with a f-prot installer. It scans and cleans viruses, except not on NTFS, it only tells you if your NTFS partition is infected, which it probably is. Because Linux NTFS support is still unreliable. But the advantage is you scan from a known clean disk and the latest virus definitions. And it's free.

  31. DUP DUP DUP by Anonymous Coward · · Score: 1, Informative

    So not only is this a dup of an earlier story from last year, but this posting is the EXACT SAME TEXT as the earlier story. Is Slashdot now rerunning stories that reach or approach their 1-year anniversary???

  32. Re:You mean linux NTFS support... by irgu · · Score: 2, Informative

    Last I heard write was still experiencing random failures [...]

    That was 4-5 years ago. Then Anton Altaparmakov disabled the unreliable write support and started to write a new driver from scratch. Today that one is included in Linux 2.6 kernels and it's reliable. Altough the write support is still limited but for example NTFS resizing is widely used and very reliable for over two years.

    There are also two additional binary-only, full-featured, read-write NTFS drivers. One of them is Captive NTFS, using Windows' own NTFS driver the Wine way, and the other one is Paragon's NTFS driver.

    Knoppix has four of the NTFS drivers:
    1) old, broken NTFS in 2.4 kernels
    2) new, safe NTFS in 2.6 kernels
    3) Captive NTFS
    4) userspace utilities: shared code with 2) but no kernel driver needed

  33. Re:So you can fix Linux.... by dmaxwell · · Score: 2, Informative

    You have to make it yourself. That remaster has files that are copyright MS on it. You'll need a fairly beefy machine to do it in less than geological time. A machine that is at least 1GHz and 512MB(+ 1GB swap) of memory gets tolerable. I use a 2.4Ghz PIV with a GB of RAM. That will spit an iso out in about 7 minutes. You will also need at least 3GB of disk space to hold the uncompressed distro and the iso you will make from it. Follow the instructions here.

    Knoppix IS Debian so you'll need some Debian knowledge to update the package database and to add and remove files. You will be doing most of the work in a chroot so you DON'T need a Debian machine to make a remaster. You can even boot from a KNOPPIX cd and create it that way.

    Once you've created your Knoppix development environment according to the instructions, you do these things to enable captive.

    1. Create a captive user.
    2. Create a captive group.
    3. captive-install-acquire

    Cheers!

  34. Re:So weird... by Edie+O'Teditor · · Score: 1, Informative
    ... are not likely to head crying for the nearest GUI.
    Leaving aside the fact that machines without a floppy are hardly rare these days, knoppix will boot in text mode.
    --
    If X is the new Y, and Y is "X is the new Y", solve for X.
  35. Re:So weird... by Anonymous Coward · · Score: 1, Informative

    > why there isn't a bootable Windows CD for recovery (maybe because it would be the most pirated CD ever?).

    Your wish is granted :-), BartPE awaits you:

    http://www.nu2.nu/pebuilder/

    I've used this at work several times, and would NEVER consider the """Windows Recovery Console""" (ROTFLMAO) as a valid substitution for BartPE ever again.