LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-28-2006, 08:18 PM   #1
Freedom Seeker
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.2, Knoppix 5.0.1, MEPIS 6.0
Posts: 22

Rep: Reputation: 15
Clone Slackware to New Partition?


Introduction:
Because I want a portable linux system on my 40GB USB 2.0 SCSI harddrive, I installed Slackware to a 38GB RFS partition on the USB drive (/dev/sda2/). (I used the remaining space for a 1GB linux swap and a 1GB cross-platform share space.) My BIOS loaded LILO from my harddrive, which then uncompressed the kernel, but because the default kernel was not configured to directly mount SCSI nor mass USB without the use of modules, the kernel panicked. (See thread: "Kernel panic: VFS: Unable to mount root fs" - Kernel fails to boot linux")

The Concern:
After many attempts to install my custom kernel to the Slackware filesytem by using either a Knoppix or MEPIS CD, I resolved to install Slackware 10.2 to my computer's local harddrive (which can boot normally), upgrade the existing kernel to my custom linux kernel 2.6.17 including SCSI and USB support, and then use a raw cloning tool (window's based - but it's flawless, so I won't complain) to copy the Slackware partition from /dev/hda3/ to /dev/sda2/. Because I am changing root directories physically, what modifications will I have to make to the cloned Slackware system to get it to functionally operate? Also, in case I boot my USB slackware on a computer with an internal SCSI drive, would I need to redirect LILO and my kernel to boot from /dev/sdb2/? My sincere thanks to all who will help.
 
Old 08-28-2006, 11:44 PM   #2
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 111

Rep: Reputation: 15
Follow the instructions on the boot screen from Slackware install CD 1 to boot the partition after copying it (using the sata or huge26 kernel). Then you should be able to get away with modifying lilo.conf on the partition and launching lilo to write a boot sector.

Reboot, and it should work if everything went well. If not, you can still boot using the Slackware CD to change whatever messed up.
 
Old 08-29-2006, 12:03 AM   #3
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
would I need to redirect LILO and my kernel to boot from /dev/sdb2/?
I can't say for sure sence I've mever used it, but I hear that the Grub boot loader would be better for this. It has an actual boot console so you can enter in boot params on the fly. Lilo is hard coded to the disk so it's not the most flexible.

regards,
...drkstr
 
Old 08-29-2006, 04:14 PM   #4
Freedom Seeker
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.2, Knoppix 5.0.1, MEPIS 6.0
Posts: 22

Original Poster
Rep: Reputation: 15
Grub on Slackware?

Quote:
Originally Posted by drkstr
I hear that the Grub boot loader would be better for this.
Yes, I have been quite interested in downloading and installing Grub for my linux system, but because Slackware is not packaged with Grub, how would I obtain the install files and what would I do to install Grub? I have researched GNU Grub's website, but because there is no documentation for GRUB 2, (I see no reason to install legacy) I am almost clueless. Thanks to all.
 
Old 08-29-2006, 04:40 PM   #5
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 111

Rep: Reputation: 15
You can grap a pack for Slack 10.2 from linuxpackages.net: http://www.linuxpackages.net/pkg_details.php?id=7438
 
Old 08-29-2006, 04:54 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Moving stuff around (a lot) gets to be a pain. You need to make sure *all* the drivers are included in the kernel - particularly relevant if you plan to later copy to some (currently unknown) internal disk later on.
Using external USB can be iffy due to timing issues when mounting the root - even when all the support is compiled in.
fstab will need cleaning up each time the device designation changes.
...

As for grub, I thought there was a package on the extra CD (been a while since I used Slack). I always install onto grub systems, and skip the loader, so it was easy for me. In your case you might be better off staying with a standard install, get all those issues sorted first, then look at grub later.
As for grub 2, I've not seen a distro use it - I'm sure there are examples, but they don't seem to be the well-known ones.
If I was new to grub, I'd take that as a hint.

Last edited by syg00; 08-29-2006 at 04:55 PM.
 
Old 08-29-2006, 06:22 PM   #7
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Quote:
Originally Posted by Freedom Seeker
Introduction:
Because I want a portable linux system on my 40GB USB 2.0 SCSI harddrive, I installed Slackware to a 38GB RFS partition on the USB drive (/dev/sda2/).

Also, in case I boot my USB slackware on a computer with an internal SCSI drive, would I need to redirect LILO and my kernel to boot from /dev/sdb2/? My sincere thanks to all who will help.
I don't know, if I understand you in the right way. Your Slackware system is on a USB disk. From this USB disk you want to be able to boot any computer via BIOS-USB-Boot. And in these computers IDE and SCSI harddisks should be usable for your running Slackware system!?

You copy your custom kernel with usb and scsi support with the modules out of /lib/modules/your_custom_modules to your usb harddisk. Then you modify the /etc/lilo.conf of your installed Slackware system (which you installed to create your custom kernel).

First copy your original /etc/lilo.conf to /etc/lilo.conf.bak and edit the /etc/lilo.conf:

Code:
...
boot = /dev/sdb # if your usb drive is /dev/sdb
...
image = /boot/vmlinuz-custom
  root = /dev/sdb2 # you mentioned you installed it to the second partition
  #initrd = /boot/initrd.gz
  append = "quiet"
  label = slackware
  read-only
...
Then you run

Code:
lilo -v
and LiLO should be installed proberly. I usually copy the /etc/lilo.conf to the usb disk to have one there to modify later out of the running (usb booted) system. Copy the original /etc/lilo.conf.bak back to /etc on your pc.

Another way is to chroot to the mounted usb disk and run "liloconfig" to install LiLO. I do it in this way:

Code:
mount --bind /dev /mnt/sdb2/dev
mount --bind /proc /mnt/sdb2/proc
chroot /mnt/sdb2
I assume, that you are running Slackware on your pc (installed for creating the custom kernel) and that you have mounted your usb harddisk to /mnt/sdb2.

Then you run

Code:
liloconfig
and follow the graphical installer.

This should work also.

Inspite of compiling a new kernel you can take the default Slackware kernel (e.g. out of current) and create a ramdisk with SCSI drivers and USB drivers out of /lib/modules/...

This works fine for me on a notebook with SCSI harddisk - I use

Code:
mkinitrd -c -k 2.6.17.11 -m libata:ata_piix:ahci:exportfs:xfs:ac:button:fan:battery:processor:thermal:video
- to have a full featured and bootable Slackware kernel with SCSI support for xfs filesystem and ACPI with all features. And if you edit the linuxrc in the initrd.gz to have 10 seconds for loading the usb modules and checking the usb ports for the usb disc, there are no problems to boot from usb harddisk.

Fluxx.
 
Old 08-29-2006, 08:34 PM   #8
Freedom Seeker
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.2, Knoppix 5.0.1, MEPIS 6.0
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00
Using external USB can be iffy due to timing issues when mounting the root
Quote:
Originally Posted by Fluxx
if you edit the linuxrc in the initrd.gz to have 10 seconds for loading the usb modules and checking the usb ports for the usb disc, there are no problems to boot from usb harddisk
Could somebody post example code of how I could force the kernel to wait for my USB SCSI drive to mount under /dev/sda2? I've seen both timer and loop functions.
______________________________________

Quote:
Originally Posted by syg00
fstab will need cleaning up each time the device designation changes
Does device designation refer to /dev/sda2 or the physical USB port? I plan to always mount the drive as the only SCSI device, but not always with the same port.
______________________________________

Quote:
Originally Posted by syg00
but they [GRUB 2] don't seem to be the well-known ones. If I was new to grub, I'd take that as a hint.
I have resaerched GRUB some, and I remember an option to remap devices or partitions without the kernel knowing. Would this be a good way to gaurantee slackware would always mount as /dev/sda2 even if other SCSI devices are installed in the booted system? Also, I know LILO doesn't function properly if it cannot find each listed mount point in the system. Can GRUB have extra entries that do not always have existing reference points?
______________________________________

Quote:
Originally Posted by Fluxx
And in these computers IDE and SCSI harddisks should be usable for your running Slackware system!?
I plan to only mount the partitions on my own drive. The filesystem I will be accessing will be:
  1. /dev/sda1 - - Linux Swap - - 790MB - - Page File
  2. /dev/sda2 - - ReiserFS - - - 38GB - - - - Root Directory
  3. /dev/sda3 - - vFAT - - - - - - - 790MB - - Cross Platform Share
______________________________________

Quote:
Originally Posted by Fluxx
Code:
append = "quiet"
Code:
mkinitrd -c -k 2.6.17.11 -m libata:ata_piix:ahci:exportfs:xfs:ac:button:fan:battery:processor:thermal:video
Could someone provide a general explanation to the initrd file. I assume I couldn't use an initrd for RFS and SCSI support because the kernel must be able to access the drive before it can access the initrd. Also, what does "quiet" do?
______________________________________

During my installation I enabled the Appletalk Daemon, which slowed the boot process. How do I disable it, and what would I do to temporarily activate it?

Because I plan to boot my USB installation from various machines, I wanted to pick a generic video card for maximum compatibility when I ran xorgconfig. I chose Linux Framebuffer, but when I typed startx I received a message similar to "Error: no screen present". What video card should I select for generic support?

Finally, what file would I edit to shorten the hostname? It takes too much space in my bash prompt.

Guys -- and girls, to be politically correct -- I've exhausted my list of curiosities.
I have the Slackware Essentials book in case it has any good references. Thank you so much for your support to change me from a newbie to a power user. I greatly appreciate it.
 
Old 08-29-2006, 10:03 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
i) I never use initrd, so I would use "rootdelay=10" on the loader option; clean and simple. Presumably you could do the same with lilo as it's a kernel parm.
ii) I was indeed refering to the "/dev/sd??" nomenclature.
iii) if you are booting off the drive with the root, it should always be /dev/sda? - nothing to worry about.
iv) for the video, just pick "vesa" as a generic.
 
Old 08-30-2006, 07:12 AM   #10
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Here

http://www.linuxquestions.org/questi...=usb+initrd.gz

you can find a short how-to which explains step by step how I managed it to run Slackware from an external USB disk.

And - it is only my way to do it. There are other ways, may be more "clean" and more "easy", but it is how always in life: many ways to just one aim ...

Fluxx.
 
  


Reply



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
clone HD or backup partition image to CD? jovie Linux - Newbie 3 06-23-2006 02:25 PM
can i use dd to clone a partition? dr_zayus69 Linux - Software 1 01-25-2005 04:57 PM
Clone root to = or > partition on diff type hd quickly! suguru Linux - Software 13 08-09-2004 12:53 PM
CLone/Copy a partition Tyir Linux - General 12 01-28-2004 09:02 AM
How do clone Linux partition? samxiao Linux - Software 5 12-24-2003 07:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:38 AM.

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
Open Source Consulting | Domain Registration