Difference between revisions of "Rescue FAQ"


From Knoppix Documentation Wiki
Jump to: navigation, search
(Replaced content with "{{delete|outdated}} ~~~~")
 
(26 intermediate revisions by 14 users not shown)
Line 1: Line 1:
-German Version: [[Rescue FAQ Deutsch]]
+
{{delete|outdated}} [[User:WPSchulz|WPSchulz]] ([[User talk:WPSchulz|talk]]) 05:03, 3 May 2016 (EDT)
 
+
-Versión en español : [[Rescate FAQ]]
+
----
+
Return to [[Knoppix FAQ]]
+
----
+
Knoppix is a great rescue disc too. You can repair Linux or that other OS, backup data, recover passwords, etc. The following solutions assume that you have booted
+
Knoppix on the machine that needs to be repaired.
+
 
+
==== Q: I need to get into my Debian system to update some packages as my system is unable to boot! How do I do that? ====
+
A: Boot with the Knoppix CD and mount that partition using the Knoppix root shell. For example:
+
*'''mount /dev/hda1 /mnt/hda1
+
*'''chroot /mnt/hda1
+
Gives you a root shell back in your old system! Now get the resolved and updated packages [http://www.debian.org/distrib/packages] and dpkg -install them to fix the previous show stopping packages.
+
 
+
==== Q: My other Linux install is broken and I want to reinstall LILO. ====
+
A: Mount that partition and run LILO as root:
+
*e.g. '''mount -o dev /mnt/hda1''', if its already mounted, you'll have to clear the "nodev" flag: '''sudo mount -o remount,dev /mnt/hda1'''.
+
*Enter that directory as root and run lilo: '''chroot /mnt/hda1 lilo'''.
+
 
+
==== Q: Ok, I've booted Knoppix, now how do I rescue the data? ====
+
A1: See [http://www.shockfamily.net/cedric/knoppix/ Computer First Aid Using Knoppix]
+
 
+
A2: if you have a CD burner installed, use one of the various tools on Knoppix to create a CD. If you want to backup over the network, you can use NFS, Samba (windows share), scp (ssh copy), ftp,  email or more.
+
 
+
One method, using two networked machines on knoppix is as follows:
+
boot knoppix on both machines (the "broken" machine and the target machine), start ssh server on the target machine, "kmenu->KNOPPIX->Servers->SSH Server", mount a device with sufficient space in read/write mode (note: NTFS does not currently support read/write). Then you can use scp to move the data from the broken machine to the target machine (in this example, the target machine has an IP address of 192.168.1.1).  On the "broken" box (get a root shell) issue a command  '''scp -r /mnt/hda1/importantdata/ knoppix@192.168.1.1:/mnt/hda1/backup/''' this will copy an entire directory (recursively) to the target machine.
+
 
+
==== Q: I'd like to backup/restore the MBR. ====
+
A:
+
*To backup use:
+
**'''sudo dd if=/dev/hda of=mbr.backup bs=512 count=1'''
+
*To restore use:
+
**'''sudo dd of=/dev/hda if=mbr.backup bs=512 count=1'''
+
 
+
'''Caution''' the MBR contains the partition table (the first four primary entries) it will break things if you changed the partition since the backup.
+
 
+
If you do not want to restore the partition table you should use '''sudo dd of=/dev/hda if=mbr.backup bs=1 count=448''' instead. This will write only the first 448 bytes of the MBR leaving the last 64 bytes intact (4 partition table entries * 16 bytes/entry).
+
 
+
Be warned that you '''may''' not be able to boot from this disk if you changed the partition table after the backup of the MBR, depending on the actual boot loader .
+
 
+
==== Q: I forgot my password for an installed Windows/Linux!? ====
+
A1: Yeah, as if anyone would believe you! But in case you're really serious, you might try "john" and expect to wait a while.
+
 
+
A2: You can change password by chrooting into installed linux and running passwd. You may need to mount your linux read-write:
+
*'''mount -o remount,rw /dev/hd.. /mnt/hd..
+
*'''chroot /mnt/hd..
+
*'''passwd root
+
 
+
==== Q: The other Linux/*nix box does not work correctly, but im sure the network is functional. ====
+
A: try "ssh" and/or "telnet" to log in on that remote box. you'll need to know a password, but after that you can use the shell to repair the box.
+
 
+
==== Q: Rescuing knoppix with knoppix :-)  "I am a new user to linux and i just installed KNOPPIX on one partition, but then i installed windows 98 on another partition and now i can't get lilo to come back.... how do i make it so lilo will come back" ====
+
 
+
A:
+
*boot from floppy
+
**You can boot the system with the boot floppy you got when you installed Knoppix on HDD.
+
**Then edit the file /etc/lilo.conf . After that start "lilo" as root.
+
*boot from CD
+
**Boot the CD and type "knoppix 2" (see [[Cheat Codes]]). This will start knoppix into the shell/commandline.
+
**Mount your root partition '''mount  /dev/hda1 /mnt''', edit /mnt/etc/lilo.conf (insert your windows partition),
+
**Change root to your hd install: ''' chroot /mnt/hda1''' (substitute hda1 for your hd install partition)
+
*and execute lilo: '''lilo -v'''
+
 
+
==== Q: How do I load Windows (aka Samba) shares from Knoppix? ====
+
A: There are several ways but the easiest is probably:
+
*Go into Konqueror, Go up to the Location bar and Type the host information in the format: ''[smb://HOST/SHARE'']
+
*Three handy utilities to scan the network if you forget the HOST, are [[Lin Neighborhood]] (for versions released on or later than 2003-04-18), xSMBrowser (for 3.2 versions released before 2003-04-18) or Komba2 (for earlier versions) which is listed in the menus.
+
 
+
==== Q: Are there any utilities on the knoppix disk to conveniently manage partitions, e.g. ![[Disk Drake]]? ====
+
A: Tried '''parted''' ? [http://www.gnu.org/software/parted/] [http://www.knoppix.net/search?q=parted&submit=Go]
+
 
+
A2: For resizing Windows XP/W2K/W2K3/NT4/Longhorn NTFS, Solution 2 in the
+
ntfsresize FAQ (Frequently Asked Questions) at
+
[http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#example]
+
works well. Ntfsresize version 1.9.0 can even cope with fragmented partitions successfully.
+
For backup of a partition, Partition Image and ntfsclone are great!
+
[http://www.partimage.org/doc/index-3.html]
+
 
+
A3: Knoppix also includes a graphical partition utility, QTParted, which is compatible with ntfsresize.
+
 
+
==== Q: How do I setup swap? ====
+
A: On machines with small RAM you would want to have a swap file when running knoppix from CD. What you can do is to create a swap file on your partition, register it in /etc/fstab and turn swap on. That is how to do it. Choose a mounted partition which has enough free space, for the purpose of this example let it be /mnt/hda1
+
*Create a linear file: '''dd if=/dev/zero of=/mnt/hda1/swapfile bs=1024 count=65536''' for a 64Mb swap file
+
*Add the swap partition tables: '''mkswap /mnt/hda1/swapfile'''
+
*Register the file in /etc/fstab: as a root add a line '''/mnt/hda1/swapfile swap swap defaults 0 0'''
+
*Turn swapping on: run '''swapon -a''' as a root
+
*Check that the swap file appears in /proc/swaps
+
----
+
Return to [[Knoppix FAQ]] .
+
 
+
 
+
 
+
[[Category : FAQ Page]]
+

Latest revision as of 09:03, 3 May 2016

Template:Delete WPSchulz (talk) 05:03, 3 May 2016 (EDT)