Question Locked

Is anything in this Linux procedure specific to Knoppix?

0 helpful
16 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've got to build a production Linux system to transfer data to flash cards. The existing process in our other facility uses a Knoppix CD to boot a Linux system. I'm trying to figure out why they're booting an Linux system off a LiveCD. So far the only reason I can come up with is Knoppix has some capability that other distributions don't.

Please look at the procedure and commands below and see if there's any reason this couldn't be done booting from the hard drive, or if there are any commands that are unique to Knoppix. I'd like to load a distro on the H/D and just boot from there. Before anybody asks, I've never seen Knoppix and haven't yet looked up what most of these commands do.

Preliminary steps:

Connect USB flash card reader.
Boot from Knoppix CD.
Insert compact flash card in reader.
From Knoppix main menu go to ?KNOPPIX  Set password for root?
Right-click on hda3 on the desktop and click Mount.
Navigate to /media/hda3/root

Open a terminal session:

mount /dev/hda3 /media/hda3
cd /media/hda3/root
dd if=nia-720.img of=/dev/hde
cd niafs720
sfdisk -f /dev/hde /dev/null
sfdisk -f /dev/hde <128mb1.part> /dev/null
mkfs.ext3 /dev/hde1
mount ?t ext3 /dev/hde1 /mnt/hde1
tar ?zxf instimage.tgz ?C /mnt/hde1
rm ?rf /mnt/hde1/var
tar ?zxf uss.tgz ?C /mnt/hde1
chroot /mnt/hde1
lilo ?v 3 ?C etc/lilo.config
umount /dev/hde1

16 replies

by the altruist

[Mount 1st HD, 3rd partion]
mount /dev/hda3 /media/hda3
[Go to root folder on said HD]
cd /media/hda3/root
[Write a CUSTOM disk image to (I'm assuming) your USB stick]
dd if=nia-720.img of=/dev/hde
[Change to niafs720 folder]
cd niafs720
[Force CUSTOM disk operations on USB stick - I'm assuming two different partitions]
sfdisk -f /dev/hde /dev/null
sfdisk -f /dev/hde <128mb1.part> /dev/null
[Format the stick with Ext3 File system]
mkfs.ext3 /dev/hde1
[Mount the USB Stick]
mount ?t ext3 /dev/hde1 /mnt/hde1
[Extract a CUSTOM folder archive on to the USB stick]
tar ?zxf instimage.tgz ?C /mnt/hde1
[Delete the var folder from the USB]
rm ?rf /mnt/hde1/var
[Extract a second CUSTOM folder archive on to the USB]
tar ?zxf uss.tgz ?C /mnt/hde1
[Start operating exclusively from the stick from now on. Do a wiki on chroot for a better idea than I can give you.]
chroot /mnt/hde1
[I assume this makes the stick bootable. It's a CUSTOM config file]
lilo ?v 3 ?C etc/lilo.config
[Unmount the USB stick so it can be removed from the system]
umount /dev/hde1

As far as your question, is anything specific to KNOPPIX, this EXACT procedure is (or it's specific to SOMETHING) because it makes reference to a handful of custom files, but I'm sure there are similar procedures available for other OSes.

by charliespencer

I'm aware of the custom files (nia-720.img, instimage.tgz, uss.tgz, lilo.config) and I've got someone working on those for me. I'm at one facility and we've been having this done at another. Someone there is copying those files to CD for me.

They've been using a laptop. Although it supposedly has a Linux distribution loaded on it, they're booting it from a Knoppix CD. I have no idea why and can't get an answer. I've loaded Debian on a desktop; my readings at Knoppix' web site indicate that's preferred over loading Knoppix on a hard drive. It recognized my USB all-in-one flash media reader without any problem. Now it's a matter of determining which media slots correspond to which sd# assignment.

by dumphrey

i see nothing specific to knoppix its self other then how drives may be labeled in the script (as opposed to a different distro, bsd, etc).
You are mounting and pulling the custom image from the local machine HD it appears and not from the Knoppix cd, though, I could be wrong..
dd commands are dangerous in my hands... I have hosed a few systems...
Can you think of any reason then paranoid security that you would need alive cd to boot a system to do this (burn usb key images? Which I assume are bootable)? Or was the machine used multipurpose?

Seems to me a debian install would do this faster once its set up and the custom files located correct and commands modified to match current system paths.

EDIT
From Knoppix main menu go to ?KNOPPIX  Set password for root?

Anything on the KNOPPIX menu (as opposed to the K (start) menu will use custom scripts. This one is just setting a root password, obviously..

by rthomasii

Knoppix by default ships using GRUB not LILO, therefore you will need to rework the line

"lilo ?v 3 ?C etc/lilo.config"

I am assuming that you are reloading the lilo config file, and that step MAY!! not be needed with GRUB.

by charliespencer

Thanks for the 'heads up' on this issue.

I haven't researched the 'lilo' command yet so I don't actually know what it does.

by seanferd

GRUB is also. LInux LOader. GRand Unified Bootloader.

What I find odd is that the original authors were using Knoppix with the lilo command (perhaps lilo is burned to the flash drive to make it bootable?). Debian also uses GRUB by default, but generally, you can use most bootloaders interchangeably.

by charliespencer

"Can you think of any reason then paranoid security that you would need alive cd to boot a system to do this?"

I've been trying to get an answer to that question myself. I don't know why they're doing that at the other site, but I intend to boot from the H/D and have everything in a single directory.

I've already decided to do this with Debian and have it installed and booting. I'm waiting on the needed image files to arrive on CD. If I get really motivated I'll load a GUI; Debian apparently doesn't install one by default.

Re: setting the boot password. This machine will not be connected to the network or anything else. No one among the limited number of users knows any Linux and will only the name of the final command procedure. I'm going to finish the configuration, make a Ghost image, and let the users run it as root (gasp!). If they putz it up I'll just restore the image.

by dumphrey

option during install does not load a gui, but the Desktop Environment option does. Being Debian, it really doesn't matter since its just an apt-get away. Gotta respect the Debian even if you don't love the Debian.

by charliespencer

The box won't be on a network and was configured as a stand-alone. I declined any prompts for networking and have no clue how to set that up. I could always reinstall, depending on how much trouble I have. Besides, I'm not the least familiar with apt-get; this is my first distro that uses it.

by seanferd

You may simply need to start the X windows system. On the other hand, a single base install disk may not have a GUI available for installation.

edit: Duh, the command is exec startx. That might have been sensible to add here.

by dumphrey

apt will use that as a source for installs.
look in /etc/apt/sources.list
The install cd should be listed and not commented out.

You can add a new cd using the apt-cdrom command (new release, new dvd, extra packages etc, since none of us download all the cd's).

http://mirror.atrpms.net/ccrma/man/man8/apt-cdrom.8.html

Of course this assumes you have a full cd and not the net install cd.

If you have time a reinstall with networking and Desktop environment would be good. You can always manually turn off the net interface to prevent plug and browse, as well as disable the dhcpd client from default boot (apt-get BUM or rcconf to help manage start up services in Debain based distros, rcconf is an ncurses based program run from a terminal).

I prefer rcconf over BUM, but thats me.

by charliespencer

Most of my (very limited) previous Linux experience was with RH / Fedora, where setting up the installation media as a repository was an absolute nightmare. I found my unsuccessful attempts so discouraging I didn't touch Linux again until this project. I'm glad to hear I shouldn't have such problems with Debian, although I still haven't decide if I'm motivated enough to load a GUI. I suspect leaving everything at CLI will discourage my users from attempting anything not on their "How To" procedure.

by dumphrey

and a good reason not to install a gui. but, I would ensure they do not have root privs anyway, to prevent accidental breakage. But, being linux this should not be an issue.

Apt is to the redhat package manager as Ferrari is to a Mustang...

by charliespencer

I mounted the original install CD and I can see the contents. I tried both

apt-get install kde

and

apt-get install gnome

and other variations of 'KDE', 'Gnome', etc. All result in

E: Couldn't find package kde

or whatever package name I try. The problem is I don't know how to determine the exact package name, or what's on the CD. In theory it's the full CD and not the net install. I didn't have it connected to the network during installation and I assume the install would have crashed with the net install CD.

by dumphrey

that is bootable. It downloads updates from the web, but should install the basics as is. The fact that it did not find a desktop through apt means the cd does not have the packages. All you would need to do is plug it in to a cat 5 for the install then unplug it again.

This discussion is closed to new replies.