kanotix.com

Installation - Install on a USB enclosure

bryan_e_boone - 17.08.2006, 00:49 Uhr
Titel: Install on a USB enclosure
This is really two things.
First of all after a hard drive install of 64-bit Kanotix, I wanted move the SATA drive to a USB enclosure. So I pulled it out and put it into the enclosure. I then tried to boot. It wouldn't of course. It died on a kernel panic about not accessing root and some bad root= option and a bad block on (0,0). So I take my hd out of the enclosure and put it back internally. It boots fine. So have I missed a grub/fstab option?

The other thing is I had a free SATA drive and put it in the enclosure.
I booted the liveCD, then went through the Kanotix installer and installed it to the enclosure (no problem on the install). So I then try to boot off my freshly installed Kanotix on the enclosure and got exactly the same error as I did before.

Now I'm really confused... I know I can install and run various Solaris/OpenSolaris from the enclosure. Surely I missed some option in grub?

Thanks for the any info.
-B
gs - 17.08.2006, 06:12 Uhr
Titel: Install on a USB enclosure
in the FAQ there is a chapter on on installing to hard drive - to usb-drive......
you need to make the suggested changes of mkinitrd etc before you can boot from the drive..
its different with other distros, e.g. PClinuxOS installs and starts right away from the usb-drive

But with the outline in the FAQ Kanotix will work, at least the 32-bit version
devil - 17.08.2006, 07:20 Uhr
Titel: Install on a USB enclosure
http://kanotix.com/FAQ-id_cat-63.html#q321

greetz
devil
bryan_e_boone - 17.08.2006, 12:55 Uhr
Titel: RE: Install on a USB enclosure
Oh I see...
But what if I want to take an existing installation and put it on the external hd?
Can I boot the liveCD with the external usb (where the existing kanotix is)
and perform the steps to make the initrd?
Thanks.
-Bryan
schnorrer - 17.08.2006, 13:46 Uhr
Titel: RE: Install on a USB enclosure
does your bios support boot from USB-HD? USB-CD is no Problem.
bryan_e_boone - 17.08.2006, 15:33 Uhr
Titel:
Yes, It does.
schnorrer - 18.08.2006, 07:00 Uhr
Titel:
perhaps, I got my usb-hd working with changed bios-sttings, BOOTOPTION: 1. USB-HD, 2. CD, 3. HD_0
with this settings in the bios, I can install the Kanotix-CD like normal, but I should never reconnet this USB-HD at an other USB-Port than where it was installed.

Otherwise the bootchain is CD than grub Error.

Back to your System. Change the bootoption to USB-HD than run the LiveCD. From there mount the USB-HD and re-install grub to the /dev/sda1.

Boot normal and beware changeing the USB-Port.
bryan_e_boone - 18.08.2006, 18:59 Uhr
Titel:
Here's the situation.
I have been running for the past 9 month on an installed (internal) 64-bit version of Kanotix.
I now want to take that internal drive and put it in a USB enclosure (external).
My USB bios is correct because I can boot USB sticks.
I can also install and run Solaris on a USB enclosure.
There must be a grub setting (or something) that I must be missing.
schnorrer - 18.08.2006, 19:30 Uhr
Titel:
Sorry I did a install with SOLARIS-10, USB-HD install is not supported by Solaris., may be they have changhed it with Solaris 10.1.

Installing solaris and Linux the chain is Linux with grub, than Solaris. or both on a seperate HD, than there is rule which OS to install first.
bryan_e_boone - 18.08.2006, 19:35 Uhr
Titel:
The Solaris on a USB enclosure works with 06/06, OpenSolaris, and Nexenta.
Forget for a moment about Solaris.

The problem is that I think I'm missing something in grub when I take my interal
drive (where Kanotix is) and put it in the enclosure.

Grub is on the MBR of the external drive so any boot order will follow that on the external drive, where it originally worked anyway.
-B
gs - 18.08.2006, 22:02 Uhr
Titel:
I do not know whether this helps, but my BIOS (Phoenix-Bios in a Fujitsu-Siemens Scenic PC) allows to set where it looks for the OS, i.e first CD-Rom, second IDE-harddrive, third usb-harddrive. I can change the order of the drives and put my usb-drive before the IDE-(internal)drive. If I do this, the usb-drive, for GRUB, is (hd0) and the entry in menu.lst must correspond.
If in the boot order the usb-drive is set behind the internal drive the BIOS first looks for the boot manager in MBR of the internal drive and if I want to boot an OS from the usb-drive, it resides on (hd1) and the menu.lst from the GRUB of this MBR must be set accordingly.
To sum up: after making the initrd for Kanotix on the usb-drive I can boot directly from this drive if it is set in the first position of the boot order and GRUB has been installed in the MBR of this drive,
or I can boot from GRUB of the internal drive if there is one and menu.lst is adapted......
bryan_e_boone - 18.08.2006, 22:08 Uhr
Titel:
I don't think it's a BIOS thing. I explicity tell my pc to boot off the USB.
So the question is, can I run the initrd steps on a harddrive with Kanotix already there?
If so, which part of the FAQ do I need to follow?
SteveR - 19.08.2006, 00:09 Uhr
Titel:
Bryan,
Even though you set the Bios to boot off the drive, you may have thereby altered the named drive order.

This will indeed start grub correctly, however grub now doesn't have the right drive numbers (names). By changing the bios drive setting grub now tries to boot from the wrong numbered drive.
SteveR - 19.08.2006, 00:13 Uhr
Titel:
You see, grub's menu.lst was created when the drive order was different than it was after you changed the bios. Therefore grub thinks root is on the wrong drive.

Unfortunately, if you can't boot, you can't read menu.lst to check it for correct drive references and change it, if necessary.

I solved this problem by booting a partition tool (Ranish Partition Manager) on a floppy and reading the drive order (F5 key to cycle through the drives). This clued me in to the fact that the drive order had changed since I'd reset the boot order in Bios. Since I could now see what the drive order was, I just rebooted from the Kanotix CD and put the appropriate drive numbers in menu.lst. Then it booted fine.
bryan_e_boone - 19.08.2006, 00:49 Uhr
Titel:
I didn't update the bios (or change boot order) after I installed kanotix.
I can boot, it just ends in a kernel panic.
I'm booting off grub on the external drive (I've removed the internal one completely)
From googling around (and looking at the FAQ) it looks like initrd. (but I don't know what)
I can try changing the values in grub tho, if you have any suggestions.
It originally booted off sda2 hd(0, 1). What would it be now?
SteveR - 19.08.2006, 03:13 Uhr
Titel:
Try to hit c (for command mode) when you're in grub

then do a:

find /boot/vmlinuz

This should show where the linux boot partition is.

Once you've found where it is, switch grub to edit mode by hitting <ESC>, <RETURN>, then an "e".

This will let you edit the menu.lst Plug in the right values that you found in the find operation, and try to boot with them direct from command level in grub.

Use "help" in grub command mode for command info.
bryan_e_boone - 19.08.2006, 04:14 Uhr
Titel:
i'll give it a try... what about the kernel panic thing? can this be related to the initrd?
SteveR - 19.08.2006, 04:51 Uhr
Titel:
Don't know, but first things first, make sure you're booting root instead of garbage.

After that, check that you have the right cheatcodes for your install -- like they were back when you booted from CD. For instance if you need no dma and or no acpi on CD boot, make sure those are also in the grub entry. I noticed that nodma disappeared after my own install, and had to add that cheatcode back by hand.

Also open /etc/mkinitrd.conf in an editor and make sure the delay line is set to 10 (not 1) and the reference to mkext2fs has been changed to mkcramfs. These changes were made if you followed the HD Install FAQ instructions correctly.

Also open /etc/mkinitrd/modules in an editor and make sure the lines:

ehci-hcd
usb-storage
libusual

have been appended to the file. Again, this is what the FAQ Instructions would yield.
gs - 19.08.2006, 06:24 Uhr
Titel:
@brian: regarding your question which part of the FAQ to apply and when:

First: you install Kanotix to a partiton of the external (usb) drive (which you apparently did already)

Second: you boot with the Kanotix-live-CD which you had used for the harddisk-install and

Third: you execute all steps indicated in the link given by devil in this thread. You will notice that the third step of this know-how chroots to sdx, i.e.to the partition you had installed Kanotix, meaning you are now root of this installation and the steps following will be executed within this installation. This also means that the initrd you create will be the initrd of your usb-installation.

When have done all steps your kernel panic should disappear and you Kanotix should boot from the usb-drive

good luck!
bryan_e_boone - 19.08.2006, 14:11 Uhr
Titel:
Great!!!
The _real_ use case is that Kanotix has all my mp3s;)
Nothing like that to drive me nuts to find the solution;)
SteveR - 19.08.2006, 14:39 Uhr
Titel:
Hmmmm,

if you didn't change the boot order to boot from the usb drive in bios, I wonder if that is part of the problem. All depends on:

1.) how your particular bios handles this (manually or automatically) and its final actual boot order and drive priority settings
2.) what drives you have on your system in its final configuration
3.) the location of grub giving the error messages.

Example: if you have two physical drives on your system (including the external usb,) and grub was installed to the non-usb drive in its MBR, and the boot order favors that drive first, and if grub is looking to that drive for the root partition, it obviously won't work.

Another thing occurs --- there's a reference in the grub FAQ here about a grub component needing to be located in the first 1024 cyls of the drive:

"Grub knows no 1024-cylinder barrier and can boot systems above 1024 cylinders. However, "/boot/grub/stage2" must be accessible by the bios (must be before 1024 cylinders)....

Any possibility you have set drive partitions up so stage 2 is above 1024 cyls?
SteveR - 19.08.2006, 14:44 Uhr
Titel:
You should be able to resolve this without re-installing.

You still haven't indicated what the result of doing a c, find /boot/vmlinuz is.
bryan_e_boone - 19.08.2006, 18:16 Uhr
Titel:
HMM.. I'll have to try Monday...
It's a work pc... I'm at home;)
I'll be sure to follow up with the results
bryan_e_boone - 21.08.2006, 16:21 Uhr
Titel:
SteveR:
results from the find:

(hd0,1)

I've also stepped thru the faq and make the adjustments.
Still can't get past the kernel panic yet, tho
SteveR - 24.08.2006, 07:01 Uhr
Titel:
Can you post your menu.lst contents here?
bryan_e_boone - 30.08.2006, 18:06 Uhr
Titel:
itle Debian GNU/Linux, kernel 2.6.17-slh64-smp-1 Default
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17.6-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17.6-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17-rc4-git9-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17-rc4-git9-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.16.20-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.16.20-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot
bryan_e_boone - 30.08.2006, 18:07 Uhr
Titel:
Still limping along...
I debating on putting Kanotix back on the internal drive and running Solaris in VMWare.
-Bryan
SteveR - 31.08.2006, 05:16 Uhr
Titel:
Bryan, that's only part of it. Below is my own menu.lst. (I have 2 internal HDs and a usb hd with / starting on the second partition of Sda. Therefore Sda2 or according to grub (hd2,1)) You didn't give the lines further up in menu.lst, like the upper ones I've bolded -- they also have disk designations, and those aren't comments despite the single #. I don't see any initrd lines. Also my 2005-04 Kanotix kernel is named very differently than yours -- maybe you are using a different Kanotix version and it has a different naming convention, I don't know. Anyway here's mine :

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
default 1

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined) .
timeout 5

# Pretty colours
color cyan/blue white/blue
gfxmenu (hd2,1)/boot/message

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce acpi=off vga=0x317

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=false

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## ## End Default Options ##

title Debian GNU/Linux, kernel
root (hd2,1)
kernel /boot/vmlinuz root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce acpi=off vga=0x317
initrd /boot/initrd.img
boot

title Debian GNU/Linux, kernel 2.6.14-kanotix-9
root (hd2,1)
kernel /boot/vmlinuz-2.6.14-kanotix-9 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce acpi=off vga=0x317 nodma
initrd /boot/initrd.img-2.6.14-kanotix-9
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
title Windows 95/98/ME (hda1)
root (hd0,0)
makeactive
chainloader +1
bryan_e_boone - 31.08.2006, 13:03 Uhr
Titel:
Sorry,
I assumed it was all comments... Let me get it again...
Also, during boot I change sda2 to sdb2 and in fstab I had changed the mount from sda2 to sdb2. I'll send it again when I mount reiser again.
Thanks for having a look
bryan_e_boone - 01.09.2006, 14:12 Uhr
Titel:
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue
gfxmenu (hd0,1)/boot/message

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=false

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.6.17-slh64-smp-1 Default
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17.6-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17.6-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.17-rc4-git9-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17-rc4-git9-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

title Debian GNU/Linux, kernel 2.6.16.20-slh64-smp-1
root (hd0,1)
kernel /boot/vmlinuz-2.6.16.20-slh64-smp-1 root=/dev/sda2 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
#title Windows 95/98/ME (sda1)
#root (hd0,0)
#makeactive
#chainloader +1
SteveR - 01.09.2006, 15:25 Uhr
Titel:
Your drive designations are consistent throughout assuming one drive only. Don't connect any usb memory sticks, flash cards, etc before trying to boot with this Menu.lst, because they can shift your Sda to Sdb. Hot plug a memory stick, etc only after booting fully from a USB HD.

Still don't see any "initrd" lines. (Red in mine). Sure you followed the FAQ instructions for setting up a USB drive?

Like I say, I'm using 2005-04, so I don't know what the vmlinuz names are in the 64 bit version you are using, but they have the name "xxxxxKanotix"xxxxetc. in mine. Don't know if that is a convention or something that was changed. Maybe someone else with your Kano version can look in their menu to compare.

I'd say that narrows it down to initrd lines or wrong vmlinuz. Since you say it works when in the computer but not in the USB enclosure, the vmlinuz name is probably correct, and the problem is the initrd.

If so, check /boot for initrd files. If found try ading their names the appropriate lines to menu.lst. If you don't fnd them, regenerate them with the steps in the FAQ. If they do exist, and you add them to menu.lst, and it still doesn't work, regenerate them from FAQ and try again. If none of the above work, start from scratch.
bryan_e_boone - 01.09.2006, 15:51 Uhr
Titel:
OK...
So I need to make the modification while the internal and external drive are active?
Usually I had disabled the internal drive just to make sure I didn't blow anything away that I needed;)
I'll give it a try today.
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007