Reformatted detailed command section so dvi/ps/pdf would look right.
1 parent b5994b7 commit 63e74e4bf7613be5107a1d8df5e1a11e78052844
@tundra tundra authored on 18 Mar 2008
Showing 1 changed file
View
130
Imaging-SUSE-Linux-With-tbku.txt
 
fdisk /dev/hda
 
# Delete and create partitions as you like
# Make sure the partition that will mount /
# is toggled to be bootable
# Be sure to use the 'write' option before exiting
# Make sure the partition that will mount / is
# toggled to be bootable Be sure to use the
# 'write' option before exiting
 
# Suppose you end up with this:
#
# /dev/hda1 is for swap (type 82)
mkswap /dev/hda1
mkfs.reiserfs /dev/hda2
mount /dev/hda2 /mnt
 
# Now, let's create the top level directories that that
# were not backed up and/or will be used by the kernel
# for its own filesystems:
# Now, let's create the top level directories
# that were not backed up and/or will be used
# by the kernel for its own filesystems:
 
cd /mnt
mkdir dev media mnt proc sys tmp
 
# Now it's time to mount your backup medium. Depending
# on your backup medium this can be one of several
# devices. CD/DVDs are often found at /dev/hdc. USB
# drives show up as SCSI drives such as /dev/sda1, and
# so on. You'll also need to know the type of the
# backup medium (see: man mount for the details):
# Now it's time to mount your backup medium.
# Depending on your backup medium this can be
# one of several devices. CD/DVDs are often
# found at /dev/hdc. USB drives show up as
# SCSI drives such as /dev/sda1, and so on.
# You'll also need to know the type of the
# backup medium (see: man mount for the
# details):
 
mount -tvfat /dev/sda1 /mnt/mnt # This is a USB drive
 
# OK, time to dump the image previously created by tbku
# onto our shiny new filesystem (make sure your current
# directory is still /mnt before doing this):
# OK, time to dump the image previously
# created by tbku onto our shiny new
# filesystem (make sure your current directory
# is still /mnt before doing this):
 
tar -xzvf mnt/my-system-image.tar.gz
 
# Now we have to make sure that the boot tables and
# default file mounts are correct - Our target system
# may have a different drive type or device (SCSI, SATA,
# PATA) than the system from which tbku took the image:
 
# We need to make sure that things are mounted to
# reflect the partitioning you did with fdisk. This is
# done by editing:
# Now we have to make sure that the boot
# tables and default file mounts are correct -
# Our target system may have a different drive
# type or device (SCSI, SATA, PATA) than the
# system from which tbku took the image:
#
# We need to make sure that things are mounted
# to reflect the partitioning you did with
# fdisk. This is done by editing:
#
# /mnt/etc/fstab
#
# Remember that drives can be named by device name
# (/dev/xxxx) or by the drive id name (/dev/disk/by-id/xxxx).
#
# In our case the relevant portion of /mnt/etc/fstab
# looks like this:
 
# Remember that drives can be named by device
# name (/dev/xxxx) or by the drive id name
# (/dev/disk/by-id/xxxx).
#
# In our case the relevant portion of
# /mnt/etc/fstab looks like this:
 
/dev/sda1 swap swap defaults 0 0
/dev/sda2 / reiserfs acl,user_xattr 1 1
 
 
/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs acl,user_xattr 1 1
 
# Be sure not to disturb the other stuff in the fstab
# file, or at least make sure it still makes sense.
# Be sure not to disturb the other stuff in
# the fstab file, or at least make sure it
# still makes sense.
 
# Now, check and fix the device map file:
#
# /mnt/boot/grub/device.map
#
# Since we took the tbku image from a system that boots
# from SCSI, the file looks like this:
# Since we took the tbku image from a system
# that boots from SCSI, the file looks like
# this:
 
(fd0) /dev/fd0
(hd0) /dev/sda
 
# But our new system wants to boot from PATA so it
# now needs to look like this:
# But our new system wants to boot from PATA
# so it now needs to look like this:
 
(fd0) /dev/fd0
(hd0) /dev/hda
 
# We also have to correct any differences in the boot
# menu that appears when you first start the system.
# This is in:
# We also have to correct any differences in
# the boot menu that appears when you first
# start the system. This is in:
#
# /mnt/boot/grub/menu.lst
#
# Near the top of this file you'll see something like
# this:
# Near the top of this file you'll see
# something like this:
 
gfxmenu (hd0,1)/boot/message
 
# hd0 is right - we made sure of that when we edited
# the map file above. Make sure that the offset (1 in
# this case) is also right. This is the number,
# *counting from 0* of the root/boot partition within that
# drive. In our case, (hd0,1) is correct because our
# hd0 is right - we made sure of that when we
# edited the map file above. Make sure that
# the offset (1 in this case) is also right.
# This is the number, *counting from 0* of the
# root/boot partition within that drive. In
# our case, (hd0,1) is correct because our
# root/boot partition is /dev/hda2.
 
# Following this are the individual menu entries.
# Make sure you check each line of every entry.
kernel /boot/vmlinuz-2.6.16.54-0.2.5-default root=/dev/sda2
resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.16.54-0.2.5-default
 
# As with the previous gfxmenu statement, make sure
# root (hd0,1) is right.
 
# All references to /dev/sda2 have to be changed to /dev/hda2
# All references to /dev/sda1 have to be changed to /dev/hda1
# As with the previous gfxmenu statement, make
# sure root (hd0,1) is right.
 
# All references to /dev/sda2 have to be
# changed to /dev/hda2
 
# All references to /dev/sda1 have to be
# changed to /dev/hda1
 
# Repeat this for every menu entry.
 
# Finally, let's make sure that the boot loader is
# properly installed and configured:
# Finally, let's make sure that the boot
# loader is properly installed and configured:
 
grub-install --root-directory=/mnt /dev/hda
 
 
disseminate this document without charge, so long as you do so without
modifying it in any way.
 
 
``$Id: Imaging-SUSE-Linux-With-tbku.txt,v 1.117 2008/03/17 22:29:21 tundra Exp $``
``$Id: Imaging-SUSE-Linux-With-tbku.txt,v 1.118 2008/03/18 21:15:04 tundra Exp $``