From: Douglas Mayne on
On Fri, 26 Feb 2010 12:18:53 +0100, Tinfoil Hat wrote:

> Tinfoil Hat, on 02/24/2010 12:31 PM, wrote:
>> Hi all,
>>
>> Any experience with this hardware?
>> http://www.norhtec.com/products/mcjrdx/
>
> Thanks for the answers.
>
> I've tried another trick: boot from USB stick. At first I tried with the
> instructions at
> ftp://ftp.slackware.com/pub/slackware/slackware-13.0/usb-and-pxe-
installers/README_USB.TXT
> but it still wouldn't boot.
> The boot was successful after recreating the USB stick with this script:
> http://connie.slackware.com/~alien/tools/usbimg2disk.sh
>
> Now the mistery thickens.
> If I boot from USB, in
> /dev/disk/
> I can see the USB stick, but no trace of the CF card. If I create in the
> same way a bootable CF, it still boots fine, but /dev/disk doesn't even
> exist and
> fdisk -l can't see any volume.
>
> dmesg and /var/log/messages don't show any ide-related line at all.
>
> It baffles me that it can read the CF and boot from it, and then not see
> it.
> If it could see and mount the CF, I could proceed with a network
> install.
>
> I will try Danno's advice, but I've never tampered with kernel or
> modules before. I'll go ahead and google, but if you have some neat link
> I would really appreciate it. Thanks.
>
Caveat: I don't have that hardware.
Caution: Response is somewhat long, may be bending toward off-topic.

Sometimes you need more than a simple boot disk, and you need a "rescue"
disk instead. AFAIK, Slackware stopped shipping a rescue disk somewhere
in the 10.x. series (IIRC). Fortunately, you can still "roll your own"
rescue disk. I define a rescue environment as a disk with a bootloader,
kernel, and initial ramdisk, but with no root filesystem of its own.
Instead, i is designed to "reach out" and connect to a target root
filesystem. To do this, the initial ramdisk contains all of the kernel
modules, a complete bash shell, a few critical standard utilities, and
some functionality provided by the busybox toolkit. The environment also
contains installpkg to add other required standard slackware packages.
So far I have identified the critical Slackware packages which should
be contained as a minimum and done some simple optimizations to reduce
space. At this point, I don't have a "script" that creates the required
elements from scratch. However, my manually built environment requires
slightly less than 100M. It most likey will run on any machine with between
128 and 256MB RAM, but I am not absolutely sure about the low memory
requirements.

My environment contains these Slackware packages:
http://www.xmission.com/~ddmayne/slackware/rescue/slackware-13.0/packages

Additional functionality is provided by busybox, copied from mkinitrd.
This list of symbolic links shows the functions still assigned to busybox
(i.e. were not provided by programs in the above package listing):
http://www.xmission.com/~ddmayne/slackware/rescue/slackware-13.0/busybox.links

I also provide the control file "init" which controls the boot process.

The general idea for using this environment is to begin the startup
process by loading the kernel and initrd and presenting the user with a
bash shell. If the user can "fix up" the environment well enough, then
the user can simply continue the boot process by exiting the bash shell.
The environment transfers contol to the standard root filesystem. If the
user environment cannot be fixed up, then a reboot with <CTL>-<ALT>-<DEL>
may be the best course of action.

This more complete startup environment can be useful. For example, it can
be used to jump start across a wide range of hardware. You get the
benefit of the modular kernel without invoking the huge kernel.

A Simple Example

Here is a simple case. Say you have not loaded the correct modules, or
you do not know the complete set of kernel modules that are required to
boot. For this example, let's say that you are booting a virtual machine
(on VMWare server with the LSI SCSI controller) but have not finalized a
"correct" inital ramdisk because you don't know which kernel modules are
required. This environment could be booted and you could manually enter:

# modprobe mptspi

This will trigger loading all of the dependant modules. Let's assume that
the root filesystem can now be identified by inspection as being on /dev/
sdb1. Now, you can mount it and perform additional fix ups (fix /etc/
fstab, etc.) When fixed, unmount it, and inform /* this */ environment:

# echo ROOT_DEV=/dev/sdb1 >>user.inp
# echo ROOT_FS=xfs >>user.inp

From here, if everything is "good to go", then issue an "exit" command
and see if your virtual machine will boot.

Let me know if you would like a more formal presentation of this
environmet, say, as an iso file. I may try to "script" the creation of
the startup environment, using the environment provided by "mkinitrd" as
a starting point.

--
Douglas Mayne
From: Danno on
Tinfoil Hat wrote:
<snip>
> Now the mistery thickens.
> If I boot from USB, in
> /dev/disk/
> I can see the USB stick, but no trace of the CF card.
> If I create in the same way a bootable CF, it still boots fine, but
> /dev/disk doesn't even exist and
> fdisk -l can't see any volume.
>
> dmesg and /var/log/messages don't show any ide-related line at all.
>
> It baffles me that it can read the CF and boot from it, and then not
> see it.
> If it could see and mount the CF, I could proceed with a network
> install.
<snip>

Think of it this way : The BIOS is capable of booting any OS' kernel :
WinNT, DOS, Linux, etc. So it is capable of placing the kernel into RAM,
then getting the system up and running. But once the kernel has taken over,
if the kernel itself does not have the capacity to use the IDE device, then
it is not going to appear as something available to the system.

You could install to, and run off of a USB stick, so long as you have
installed to the correct /dev/sdXXX, but I think the goal here is to use
the IDE interface?
I am assuming that you initially installed on to the CF card through a
different computer (based on the difficulties you're encountering). If you
boot the card in that system, use that system to rebuild the kernel. I
believe there are different ways to do that, here's how I do it (although,
IIRC, my method is a little out of date):
Boot up and log in as root, cd into the source code
cd /usr/src/linux
Now we'll configure the kernel
make menuconfig
Navigate the kernel config into
-> Device Drivers
-> Serial ATA (prod) and Parallel ATA (experimental) drivers
-> RDC PATA support
and change it from <M> to <Y> (change from module to static).
exit,exit,exit and "Yes" you want to save the new config.

Now the kernel has been configured, let's build it.
make bzImage
Wait a while, depending on your system's speed. It takes over an hour on a
Microclient <grin>. Once it's done, if I was building a newer kernel
version, I'd also have to run
make modules
to build the new modules, then
make modules install
to install them, but because you are just rebuilding the stock kernel with a
statically compiled module, I *think* you can stop after building bzImage.
Copy the new kernel into /boot
cp ./arch/i386/boot/bzImage /boot/MicroclientKernel

Now edit /etc/lilo.conf
If you scroll to the bottom of /etc/lilo.conf you'll see a few lines for
booting the stock kernel. Make a copy of those and put it them the end of
the file, then change the new lines
image = /boot/vmlinuz
label = Linux
to
image = /boot/MicroclientKernel
label = Microclient
Save the file, and run lilo
lilo

Shut down the system, plug the CF card into the Microclient and boot it up.
You should now see a choice of two boot options : Linux and Microclient.
Try booting Microclient. If it fails, then you'll have to reboot in the
first system again, and start messing around with lilo kernel options. This
is about the limit of my knowledge. I think the option you want is
hdc=nodma
it goes in the append line near the top of the /etc/lilo.conf, but I would
try and boot without editting that option in, first.
HTH,
Dan.


--
Slackware 12.2, 2.6.27.7, Core i7 920, GeForce 8400 GS
RLU #272755
From: Danno on
Danno wrote:
<snip>
> Once it's done, if I was building a newer kernel
> version, I'd also have to run
> make modules
> to build the new modules, then
> make modules install
<snip>
Damn damn damn. No amount of proofreading helps in pre-caffeinated mode.
That should have been
make modules_install

--
Slackware 12.2, 2.6.27.7, Core i7 920, GeForce 8400 GS
RLU #272755
From: Tinfoil Hat on
Danno, on 02/26/2010 11:31 PM, wrote:
> Danno wrote:
> <snip>
>> Once it's done, if I was building a newer kernel
>> version, I'd also have to run
>> make modules
>> to build the new modules, then
>> make modules install
> <snip>
> Damn damn damn. No amount of proofreading helps in pre-caffeinated mode.
> That should have been
> make modules_install
>


Thanks Danno,

I'll try ASAP this work on the kernel. However, I've tried also to
install everything on an USB stick, directly on the MicroClient,
after a network boot obtained through this procedure:
ftp://ftp.slackware.com/pub/slackware/slackware-13.0/usb-and-pxe-installers/README_PXE.TXT

Installation went on flawlessly. When I tried to boot from the new
usb stick it hanged with the same "kernel panic" error. Now I'm
wondering, do I really have an IDE problem or is there something
else actually going wrong?
From: Danno on
Tinfoil Hat wrote:
<snip>
>
> Thanks Danno,
>
> I'll try ASAP this work on the kernel. However, I've tried also to
> install everything on an USB stick, directly on the MicroClient,
> after a network boot obtained through this procedure:
> ftp://ftp.slackware.com/pub/slackware/slackware-13.0/usb-
> and-pxe-installers/README_PXE.TXT
>
> Installation went on flawlessly. When I tried to boot from the new
> usb stick it hanged with the same "kernel panic" error. Now I'm
> wondering, do I really have an IDE problem or is there something
> else actually going wrong?

Just want to be clear. You PXE-booted the Microclient, then installed
Slack13.0 over a network connection onto to a USB key plugged into the
Microclient?
I wonder about that as well, booting a USB stick should have been trivial.
Are you able to test-boot the USB key in another computer? Did you maintain
all the USB connections exactly as they were when you installed (eg : you
didn't change the drive from /dev/sdb to /dev/sdc)? That is, you didn't
add/remove a USB mouse, swap the USB stick into a different port, etc.


--
Slackware 12.2, 2.6.27.7, Core i7 920, GeForce 8400 GS
RLU #272755