Correct me if I'm wrong drmarathe, but I assume your USB stick is not partitioned. In that case would it not just be /dev/sda (or possibly /dev/sdb)?
I am booting form a CD. My HD has crashed.
Have a Toshiba Satelite 1805-S274.
First I did not put the stick in USB and started Knoppix Kernal 2.4.26. It shows in the fstab file 4 entries(sda1, sda2,sda3,sda4):
#Added by Knoppix
/dev/sda1 /mnt/sda1 auto noauto, users, exec 0, 0
This is after plugging in the Stick in the USB port. It shows Hard Disk Partition [sda1 thru sda4] on the desktop. But if I click on anyone it gives error Could not mount.Not a valid block device.
So subsequently
I logged in as root and did
#mkdir /mnt/flash
then when I type in
#mount /dev/sda1 /mnt/flash
It gives error
#Mount: /dev/sda1 is not a valid block device
I have tried mounting /dev/sda2, /dev/sda3 and even /dev/sda5. Nothing works.
If I tried to edit fstab file, and remove those entries.
It doesn't allow me to save it.
Second Try:
I have tried first putting the stick in USB and then booting.
Knoppix.
It syas in the beginning USB found, managed by Hotplug. Rescanning .. [001 002]
After the desktop comes up, It shows 4 partitions on the desktop
Hard Disk 1 thru 4 but no sign of Stick. If I clik on any of them it says
Step 1:
Could not mount device
Mount: /dev/sda1 is not a valid Block drive
Step 2:
Have run Utilities, Tools, USB Viewer. After a long time it shows i the left panel:
USB OHCI Root Hub
... usb-storage
If I click on usb-storage it shows all the details of the
device including the correct size etc.
Which means it has recognised the USB stick
But it doesn't show it in the the 'fstab'
Step 3:
Now how do I mount it? What to do with these non-existing hard drives?
By the way I am a Professor of IT and have used in the past
SCO Xenix. But that was 10 years ago.
Thanks a million for your patience and help.
Correct me if I'm wrong drmarathe, but I assume your USB stick is not partitioned. In that case would it not just be /dev/sda (or possibly /dev/sdb)?
Thannks Champagnemojo but /dev/sda doiesn't seem to work. Gives me an error /dev/sda or /dev/sdb is not a block device"
I have a Transcend Jetflash 128 MB brand new Stick for USB 2.0 and it is working fine on Windows. Also /utilitis/tools/usb view recognises it as
Flash Disk
Manufacturer: USB
Serial No. 61100740FC7A4D7D
Speed: 12 MB/s
USB Version : 2.00
Device Class: 00(>ifc)
Device Subclass: 00
Device Protocol: 00
Max Default Endpoint size: 64
Number of Configurations: 1
Vendor Id: 0ea0
Product ID: 2166
Revision No. 2.00
So I think it is being recognised ok.
The question seems to be what /dev/xxx entry corresponds to this Flash Rom. I am logging in as Root shell so I don't think it is an issue of permissions.
I need the correct value of this XXX. Any ideas.
Thanks
It seems like it should really be /dev/sdX (and you'd think the X would be a or b). Are you sure you have all of the right kernel modules loaded?
Ok, here's what I ended up doing. Don't know if all steps are
necessary:
BIOS stuff
1) Flashed the BIOS of my EPIA ME6000 to version 1.13
2) Changed display setting in BIOS to 'LCD' to get a readable display
3) Enabled 'boot from USB-HDD' option in BIOS
From CD-booted KNOPPIX
4) Ran mkfs.vfat directly on /dev/sda (no partition table)
5) Copied KNOPPIX CD contents to /dev/sda
6) Moved boot/isolinux/* to top level of /dev/sda
7) Renamed isolinux.[cfg|bin] to syslinux.[cfg|bin]
Edited linuxrc files (still in CD-booted KNOPPIX)
8) Copied minirt24.gz to /tmp
9) cd /tmp && mkdir 24 && gunzip minirt24.gz
10) mount -o loop minirt24 24
11) edited 24/linuxrc
a) add a 4 second delay after modules are loaded
b) force FOUND_KNOPPIX to be /dev/sda and mount that to /cdrom
12) unmount 24 && gzip minirt24.gz
13) Copy modified minirt24.gz back to the USB drive
14) Repeat the whole thing with minirt26.gz
Get USB key ready to boot (still in CD-booted KNOPPIX)
15) Download syslinux-2.11.tar.gz
16) Unmount /dev/sda
17) Untar and run syslinux on /dev/sda
Boot from USB Key
18) Boot from USB key. (I use the USB2 cheatcode for speed).
And that is about it. I can easily fit an entire KNOPPIX on the 1GB PQI
iStick, which is great. More fiddling than I hoped for, but the end
result is a no moving parts computer. I may post the exact linuxrc patch and
more detailed instructions somewhere on the web in the future, unless I am
too lazy.
I was wondering if you could send me your version of knoppix that has been made to fit a 512 MB usb key
Making Knoppix 3.6 Bootable from a 1 GB USB Flash Memory Stick
2004/10/28 pbs
REQUIRED: 1 GB or more USB stick, Knoppix_V3.6-2004-08-16-EN CD or similar, and an alert mind.
I've benefited from many suggestions on the web. In kind thanks, here is a yet more "compleat" and commented recipe.
PREPARATION:
Read everything through completely before beginning.
Be awake and alert! While experimenting and learning (the hard way!), I corrupted a couple hard disk partition tables by mistyping -- sda and hda are one character apart, and subconcious habits are dominant when weary! Backups are good. If you decide to try this, the consequences are yours.
You'll need to be root for these operations. CTRL-ALT-F1 (or F2,F3,F4) is a quick way to switch to root console access, CTRL-ALT-F5 puts you back into the GUI as knoppix rather than as root. Depending on how your hardware is assigned at boot time, the USB stick may be referenced as sda, sdb, or sdc, etc. Notice there is a difference between /dev/sda and /dev/sda1, being the entire drive as a block device or its first partition respectively.
Backup any important files on your USB to a folder on another disk; the USB stick WILL be reformatted in the process below, and it is then very easy to copy them back afterwards.
Backup sector 0 from the USB stick (and any other important hard drive!) somewhere safe like onto a floppy. It contains the MBR in the first 306 bytes and the partition table for the first four partitions in the remaining 206 bytes. If need be and you've goofed, you can replace this later by swapping input if= and output of= locations (don't mix them up). Five minutes now can save days of recovery later.
dd if=/dev/sda of=/dev/fd0/myUSBMBR.bin bs=512 count=1
dd if=/dev/hda of=/dev/fd0/myHDMBR.bin bs=512 count=1
PROCESS:
Partition and format the USB stick. This will wipe out your previous data! Use cfdisk to create a partition >700 Mb (not sure how much is needed), make it bootable and of type 06 for FAT16, and lastly write the configuration back to USB. The menus are easy to use.
cfdisk /dev/sda
...
mkdosfs /dev/sda1
Download free SysLinux 2.11 (http://syslinux.zytor.com/) to get a viable MBR for the USB stick. The next commands transfer only 306 bytes rather than 512 because mbr.bin is only that long, leaving the trailing 206 partition table bytes of the sector unchanged.
cd /Path/To/Unpacked/Syslinux2.11/
dd if=./mbr.bin of=/dev/sda
Use syslinux to install ldlinux.sys located at beginning of partition (it doesn't have to be redone later, and both v2.04 included with knoppix or v2.11 worked fine for me).
./syslinux /dev/sda1
Now copy the boot files from the CD.
mkdir /mnt/sda1
mount -t vfat /dev/sda1 /mnt/sda1
cp /cdrom/boot/isolinux/* /mnt/sda1
cd /mnt/sda1
mv isolinux.cfg syslinux.cfg
rm isolinux.bin
rm boot.cat
Edit linuxrc inside minirt24.gz (repeat for minirt26.gz if you want)
cp minirt*.gz /tmp
gunzip /tmp/m*.gz
mkdir /mnt/m24
mkdir /mnt/m26
mount /tmp/minirt24.gz /mnt/m24 -o loop -o rw
mount /tmp/minirt26.gz /mnt/m26 -o loop -o rw
Edit /mnt/m24/linuxrc and add a line midway through the file ...
test -n "$FOUND_USB" -a -z "$NOUSB" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9]"
... as shown in the following snippet which shows the lines immediately prior and after. Find it by looking for the commented section line reading
# Now that the right SCSI driver is (hopefully) loaded, try to find CDROM
<snip>
test -n "$FOUND_SCSI" -a -z "$NOSCSI" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9]"
test -n "$FOUND_USB" -a -z "$NOUSB" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9]"
DEVICES="$DEVICES /dev/hd?[1-9] /dev/hd?[1-9][0-9]"
<snip>
If you edited it somewhere else as knoppix (e.g. in the GUI), then copied it back as root,
you may have to set linuxrc back to being root owned.
ls -al
chown root:root /mnt/m24/linuxrc
ls -al
To repeat this for /mnt/m26, you can just copy the file as both kernel 2.4 and 2.6
linuxrc files were identical in KNXv3.6 when I compared them with diff.
cp /mnt/mr24/linuxrc /mnt/m26
Umount, recompress, and put back on USB stick. Minirt*.gz already has the necessary USB driver files and appropriate sleep times in it now, so there's no need to add those.
umount /mnt/m2*
gzip -9 /tmp/mini*
cp /tmp/mini*.gz /mnt/sda1
Now copy over the Knoppix directory from the cdrom. Have patience, it's big, and you're probably working at USB1.0 rather than USB2.0 speeds as that's the tested Knoppix default.
cp -r /cdrom/knoppix /mnt/sda1
If you like the initial webpage at startup, then copy
cp /cdrom/index.html /mnt/sda1
Unmount USB stick and WAIT for changes to finish writing.
umount /dev/sda1
Select boot from usb in your PC BIOS -- the specifics are system dependent -- and reboot.
FINAL NOTES:
If upon booting you want the USB stick to be writeable, you'll have to mount it again as a loop device. The USB partition containing /KNOPPIX/Knoppix file system is already mounted as read-only, and unfortunately the default desktop icon Hard Disk [sda1] refers to that. Create a new mount point /mnt/myusb to write to the drive.
mkdir /mnt/myusb
mount /dev/sda1 /mnt/myusb -o loop -o rw
ALWAYS remember to unmount the new USB stick access point first to save all cached changes before quitting, or you might corrupt the stick and have to start completely over.
umount /mnt/myusb
Hint: if it won't unmount, close all GUI windows that display this drive, cd / to get out of /mnt/myusb in all work spaces, e.g. CTRL-ALT-F1 to F4. You may even have to "init 3", thus closing the GUI to get stuck Konqueror inodes to release (check with "ps aux"). Then try umount /mnt/myusb again. "init 5" will restart the GUI, or "init 6" will complete the shutdown.
An alternative is to figure out how much is needed for Knoppix and it's boot files, limit the first partition size, and to create a second partition for writing user data. Starting with one partition first helps get it all working; also if everything is all in one space, if you suddenly need room on the USB from another OS or computer, you can wipe out /knoppix/knoppix, then replace it from CD later, though it may get fragmented on rewriting.
.ISO BOOT?:
Setting up the USB to boot from a .ISO stored on itself is less easy to do. It requires access to a number of programs in a non-ISO-encapsulated /knoppix/knoppix file system to accomplish the root transfer, and there's not enough room for both. I suppose one could add the necessary programs (and dependencies?) to minirt.gz, but it would likely take much more effort. Cool, but is it really worth it?
LAST RITES:
If in the process of experimenting with making the USB stick bootable, you've somehow corrupted it so badly that it cannot be mounted or reformatted under Linux or Windows, and even dd fails (yikes!) to wipe sector 0 with if=/dev/zero count=1, and feel your new stick is utterly destroyed ... don't despair. Http://www.killdisk.com has a freeware windows console utility that runs even under win2k's and winXP's direct disk access restrictions to wipe all blocks on a chosen drive to zero, with no mounting or existing format questions asked. RTFM. And triple check you've got the right drive! You can then reformat. This worked when even the HP Utility format utility got stuck.
Or worse, suppose you've wiped out the MBR and the partition table of the wrong hard drive, thus losing the starting cluster number for each partition in spite of the precautions above. You can still possibly recover it with "gpart", which will go searching for lost partition tables -- IF you've not made any further writes to the disk: i.e. don't write any type of data, don't delete and recreate partitions with cfdisk, qtparted, or whatever else tempts you. These will rewrite the very information tables needed for recovery. Best advice now is stop, relax!, have a cup of tea, and think it through before trying anything. Don't be hasty. I had already mucked everything up beyond gpart's powers before even knowing it existed, which left me rebuilding my HD from scratch. Now you at least have a valuable headstart hint, if you've read this in time.
POSTLUDE:
Good luck, go forth and multiply by sharing; enjoy your bootable, full function Knoppix USB stick with lots more applications, storage, and tinier form factor than a PDA!
All tweaking with minirt2?.gz can be replaced by KNOPPIX cheatcode.Originally Posted by pbs
My idea is leave minirt2?.gz as is. This allows just overrite it when new KNOPPIX version comes.
Do add cheatcode fromhd=/dev/sda1 to command line or syslinux.cfg
Originally Posted by tuxlmt
Thanks. That is much simpler for many purposes.
The longer edit does provide autodetection for which drive the stick was mounted (sda1,sdb1,sdc1 ...); this can vary if there are extra slots for assorted camera memory cards or other USB sticks, which may or may not be inserted at boot time. One less thing to remember.
Take your pick.
pete
You might want to look at this which outlines one approach to getting iso booting working. The linuxrc patch could be much simpler if you wanted (I had pretty much written a patch to linuxrc so the section to scan the $DEVICES uses an if/esle to make it check if a "fromiso" cheatcode was present and if so to hunt the drives for KNOPPIX.ISO instead of KNOPPIX/KNOPPIX and if it finds one to loop mount it as /cdrom and then check it for KNOPPIX/KNOPPIX and break if it has it.Originally Posted by pbs
Juniper EX2300-C-12P, 12 Port FANLESS POE Ethernet Switch EX2300-C
$375.00
Juniper Networks EX2300-C-12T Compact 12-Port EX2300-C Series Ethernet Switch
$300.00
Juniper Networks EX2200-C Gigabit Ethernet Managed Switch | EX2200-C-12P-2G
$49.99
Juniper Networks EX3300 EX3300-48P 48-Port Gigabit PoE+ Switch
$59.95
Juniper EX3400-48P 48 Port Switch PoE+ 4x SFP+ 2x QSFP 1xAC *Tested/Warranty*
$139.95
Juniper Networks EX3300-24P | 24 Port Gigabit Network Switch w/ Power cord
$53.99
Juniper Networks SRX320-POE 6-Port Service Gateway Security Appliance Tested
$149.99
Juniper Networks EX3300 48-Port Gigabit Switch 4x SFP+ EX3300-48T SKU 10581
$69.99
Juniper Networks EX4400-48MP 48 port 5GbE + 12 port 10 Gigabit PoE++ Switch -NEW
$1200.00
Juniper QFX5100-48T 48-Port 10G SFP 6-Port 40G QSFP Ethernet Switch Tested
$312.69