New IT forum Follow us on Twitter
04 February 2012, 04:07:00 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX reviewed in Linux User & Developer issue 104
 
   Home   SHOP Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: iscsitarget-modules sheevaplug debian  (Read 3114 times)
JustaGuy
Newbie
*
Posts: 38



WWW
« on: 22 July 2010, 06:19:45 am »

How does one install an iSCSI target on a SheevaPlug with pre-installed Debian when there's no iscsitarget-module package in the repo?
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #1 on: 22 July 2010, 06:43:19 am »

As far as I've discovered so far it's like this:

1. aptitude install iscsitarget iscsitarget-source
2. m-a prepare
3. m-a update
4. m-a a-i iscsitarget

At 4. m-a a-i iscsitarget I got:

module-assistant, error message

Bad luck, the kernel headers for the target kernel version could
not be found
and you did not specify other valid kernel headers to use.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #2 on: 22 July 2010, 06:56:27 am »

I see that when I do:
apt-cache search kernel-headers

It returns one called:
kernel-package

I'm hesitant about installing that.
I don't want to brick my plug because I messed with the kernel.

In #openplug IRC on freenode, someone just said it won't brick...
A random person, yes. Hmm, what to do.
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 22 July 2010, 07:45:24 am »

If you intend to install a lot of sources on the sheevaplug you run the risk of pulling down so many dependencies that your drive space is exhausted. If you are booting from SD card you should be safer. That's the most likely way you might brick the plug in my estimation. (If you are going to be adding the compiled module to your own plug / SD card, you will of course make a backup first, right?)
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #4 on: 22 July 2010, 07:52:52 am »

Hi Marcus,

Gladly, this is on the pre-installed Debian which came on a SD card, and df says I have 6691108 left on /.

I haven't installed this kernel-package package yet.

Many people have many ideas.
It's been suggested that I install a normal Debian kernel package from aptitude, and I'm hesitant to do anything, especially since I'm completely lost with using the bootloader these plugs have.

Also it's been said I just have to symlink a source from here to there, but neither path or file exists on the plug.

A backup sounds like a good idea, how would I go about that?
Which way is best, let's see.

I see this post:
http://www.newit.co.uk/forum/index.php/topic,428.msg1951.html#msg1951
Where you say a cloned card is a good idea in some cases, except there's no integrity checking for the process.

The post is in thread where someone had many problems doing a backup.
I'd prefer to avoid a method in which so much could go wrong- and I like the idea of checksums.

What else might I find, let me look somemore.
« Last Edit: 22 July 2010, 08:03:14 am by JustaGuy » Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #5 on: 22 July 2010, 08:58:58 am »

It looks like based on what's said in this post:
http://www.newit.co.uk/forum/index.php/topic,309.msg1099.html#msg1099

It's possible to use the dd command to make an .img file out of both partitions that exist on the SD card.
This particular post mentions the use of the following command, which I imagine could be reversed to create the image fie:
dd if=/path/to/image/file.img of=/dev/mmcblk0

Again, the aforementioned post is from a thread in which much trouble ensued.

I wonder if I could do that on the card via ssh in Windows 7 while it's running & the NFS is servicing other boxes.

I have a card reader I could use, but I think since it's on a Windows box, it could be destroyed by Windows as soon as it's inserted.
I could try booting the box with the card reader with a Clonezilla Live CD & then copy the SD card to wherever.

-----

Even better, in this post it mentions a link & how to copy the original as-shipped image back onto the SD card:
http://www.newit.co.uk/forum/index.php/topic,483.msg2250.html#msg2250
« Last Edit: 22 July 2010, 09:04:58 am by JustaGuy » Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #6 on: 22 July 2010, 09:11:47 am »

I think it's horribly frustrating that it takes so many hours of screwing around with these kernels that can't do anything, to make something as basic (in my opinion) as iSCSi work.

These are pre-installed to a 8G card! I imagine there's room for a real kernel.

Can I tell aptitude to install the currently uninstalled linux-image-2.6.32-5-kirkwood & have things like iotop, WiFi & iSCSI magically start working?
« Last Edit: 22 July 2010, 09:14:33 am by JustaGuy » Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #7 on: 22 July 2010, 09:39:40 am »

When I ask in #openplug there's mention about any newly installed kernel from aptitude being on the filesystem and not usable by u-boot somehow.

And when I ask if that's enough to get past the module-assistant error I learn the module-assistant probably won't even produce a usable module because of some kind of seperation between the SD card OS filesystem & the NAND's where u-boot expects the kernel to be.

Especially since the slightest misstep could mean $50 & 3 weeks downtime while the plug gets shipped back to the UK for repairs, I can't afford to just 'try it' and see if it works.

Where'd Marcus go?
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #8 on: 22 July 2010, 05:45:34 pm »

Your 8G card will be fine.

To backup your SD card:

  • Power down the plug
  • Connect an external drive or USB stick, one that has enough capacity to backup your SD card
  • Remove your SD card
  • Boot from NAND
  • Mount your external drive or USB stick
  • dd if=/dev/mmcblk0 of=/path/to/backup/image.img bs=1M
  • Wait patiently, maybe up to 1 hour ... you should see a completion message. Congratulations, you now have a complete backup of your SD card as /path/to/backup/image.img
  • Remove SD card, and insert another (blank) SD card, of the same capacity or larger than the first card
  • dd if=/path/to/backup/image.img of=/dev/mmcblk0 bs=1M
  • Wait patiently, maybe up to 1 hour ... you should see a completion message. Congratulations, you now have restored that image to the second SD card

If you mess things up badly, you can always download a fresh image here

It is not difficult to minimise the risks of damage (either physical, or by messing up the filesystem) to your precious SD card.

As for:

Quote
Can I tell aptitude to install the currently uninstalled linux-image-2.6.32-5-kirkwood & have things like iotop, WiFi & iSCSI magically start working?

It is unlikely that you will find anything magically start working. You will normally have to install packages and perform some configuration. Any sheevaplug kernel is likely to require manual copying to your SD card, but that's a (hopefully trivial) final step.

Right now I'm not clear how far you have reached. Did you install kernel-package yet? Here are the details for it:

apt-cache show kernel-package

Code:
Package: kernel-package
Priority: optional
Section: kernel
Installed-Size: 2316
Maintainer: Manoj Srivastava <srivasta@debian.org>
Architecture: all
Version: 12.033
Depends: build-essential, make (>= 3.80-10), po-debconf, gettext, file, debianutils (>= 2.30), binutils (>= 2.12), util-linux (>= 2.10o), module-init-tools (>= 0.9.10)
Recommends: cpio
Suggests: linux-source | kernel-source, e2fsprogs (>= 1.41.4), libncurses-dev, docbook-utils, xmlto, bzip2, linux-initramfs-tool, grub (>= 0.93) | grub2, jfsutils (>= 1.1.3), mcelog (>= 0.6), oprofile (>= 0.9), pcmciautils (>= 004), ppp (>= 2.4.0), procps (>= 3.2.0), reiserfsprogs (>= 3.6.3), squashfs-tools (>= 4.0), udev (>= 081), xfsprogs (>= 2.6.0), quota, btrfs-tools
Filename: pool/main/k/kernel-package/kernel-package_12.033_all.deb
Size: 499140
MD5sum: 82702ef30d6b8f7bb41000b0fc26cc79
SHA1: 290e2b9e46bda5ce4806f1495191ebd9d4579e1e
SHA256: 3db483a44abac914e10b77077289e9917d4e79b8743854102b61289eedebb03d
Description: A utility for building Linux kernel related Debian packages.
 This package provides the capability to create a Debian kernel image
 package by just running make-kpkg kernel_image in a kernel source
 directory tree.  It can also package the relevant kernel headers into
 a kernel-headers package. In general, this package is very useful if
 you need to create a custom kernel, if, for example, the default
 kernel does not support some of your hardware, or you wish a leaner,
 meaner kernel.  It also scripts the steps that need be taken to
 compile the kernel, which is quite convenient (forgetting a crucial
 step once was the initial motivation for this package). Please look at
 /usr/share/doc/kernel-package/Rationale.gz for a full list of advantages
 of this package.
Tag: admin::kernel, devel::packaging, implemented-in::perl, interface::commandline, role::program, scope::utility, suite::debian, works-with::software:source
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #9 on: 22 July 2010, 06:18:51 pm »

Quote
Did you install kernel-package yet?

Nope, been on pause.

I've kept busy elsewhere waiting for dependable information.

I think I'll not move forward until I can do this backup procedure, likely tomorrow.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #10 on: 23 July 2010, 10:40:47 am »

To backup your SD card:

  • Power down the plug
  • Connect an external drive or USB stick, one that has enough capacity to backup your SD card
  • Remove your SD card
  • Boot from NAND
  • Mount your external drive or USB stick
  • dd if=/dev/mmcblk0 of=/path/to/backup/image.img bs=1M

At this point I got:
dd: opening 'dev/mmcblk0': No such file or directory

So, I realized the SD card was still not put back in, so I re-inserted it & ran the command again:
dd if=/dev/mmcblk0 of=/path/to/backup/image.img bs=1M

And now it's happily doing it's thing.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #11 on: 23 July 2010, 04:21:23 pm »

Code:
root@ubuntu:/mnt# dd if=/dev/mmcblk0 of=/mnt/sda1/debie1_7_23_10.img bs=1M
dd: writing `/mnt/sda1/debie1_7_23_10.img': No space left on device
2363+0 records in
2362+0 records out
2477273088 bytes (2.5 GB) copied, 293.744 s, 8.4 MB/s

Code:
root@ubuntu:/mnt# umount /dev/sda1
can't create lock file /etc/mtab~1906: No space left on device (use -n flag to override)

I don't understand how it can say there's no space left on the device.
The source card is only 8GB, and the destination thumbdrive is 16GB.

Code:
cfdisk /dev/sda:
                        Pri/Log   Free Space                       16017.37


*****
EDIT
*****
Just a warning to anyone reading this thread, it's about to embark on a rather extensive tangent with regard to the error that just happened.
There's a blip of progress with regard to making a backup before moving on to the module(s), at this post:
http://www.newit.co.uk/forum/index.php/topic,511.msg2433.html#msg2433
I'll edit here again once it's resolved so people can skip past the off-topic troubleshooting that ensues.
« Last Edit: 24 July 2010, 08:35:04 pm by JustaGuy » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #12 on: 24 July 2010, 09:19:52 am »

Is your USB stick partitioned?

Mount it then df -h

Edit:

I guess that's not going to reveal anything new.

I would repeat the procedure, maybe reformatting the USB stick first. Remember to use a file system that can handle a file of 8G.
« Last Edit: 24 July 2010, 09:38:42 am by NewIT_Marcus » Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #13 on: 24 July 2010, 10:03:26 am »

If I don't format the newly created 'linux (type 83)' partition, the mount command complains with:
Code:
root@ubuntu:~# mount /dev/sda /mnt/sda
EXT4-fs (sda): VFS: Can't find ext4 filesystem
FAT: bogus number of reserved sectors
mount: you must specify the filesystem type

Thus, prior to doing this part:
  • Mount your external drive or USB stick
  • dd if=/dev/mmcblk0 of=/path/to/backup/image.img bs=1M

I had created a new partition on the USB thumbdrive, and formatted it ext3, so that I could mount it with:
Code:
mount /dev/sda1 /mount/sda1

Then I went through the process and wound up with this error:
Code:
root@ubuntu:/mnt# umount /dev/sda1
can't create lock file /etc/mtab~1906: No space left on device (use -n flag to override)

At that point, the following command:
Code:
cfdisk /dev/sda
had this to say about the USB thumbdrive:
Code:
                        Pri/Log   Free Space                       16017.37

I've since rebooted, and afterward the same command of:
Code:
cfdisk /dev/sda
had something different to say about it, while I didn't copy it excactly to paste here, it was just showing a single 'Linux (type:83)' partition, rather than the 'Free Space' it had before the reboot.

When I mounted the USB thumbdrive & looked in it to see if the .img file was there, it wasn't. The only contents was a 'lost + found' directory, so I deleted the partition to start over.

Now I just recreated a new partition, and formatted it ext3, this time without the '-O dir_index' option.
I have it mounted at /mnt/sda1, and just did the following command again:
Code:
dd if=/dev/mmcblk0 of=/mnt/sda1/debie1_7_24_10.img bs=1M

---
I wanted this thread to be a clean, consice how to, without all these problems I'm seeing so many others having, so the next reader could simply get something done without having to filter them out- apparently that's a tall order with these plugs, it's too bad.
I suppose later I can summarize what's pertinent at the last post, and edit the first to direct people there.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #14 on: 24 July 2010, 10:07:28 am »

About 5 minutes into the dd operation I have this output now, and it's still busy with something because there's still no '#' prompt yet. Not sure what to think about this except it looks bad:
Code:
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
end_request: I/O error, dev sda, sector 7696
end_request: I/O error, dev sda, sector 15208480
Buffer I/O error on device sda1, logical block 1901056
EXT3-fs error (device sda1): read_inode_bitmap: Cannot read inode bitmap - block_group = 0, inode_bitmap = 958
EXT3-fs error (device sda1) in ext3_new_inode: IO failure
Aborting journal on device sda1.
journal commit I/O error
dd: opening `/mnt/sda1/debie1_7_24_10.img': Input/output error
root@ubuntu:~# usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
usb 1-1: device descriptor read/8, error -110
hub 1-0:1.0: unable to enumerate USB device on port 1


**
EDIT
**

There _was_ indeed a prompt there, it was just hidden by additional output that printed on top of it.

When I try to look at what it made in the thumbdrive, I did this, which seems simple enough:
Code:
dir /mnt/sda1
And it said:
Code:
ext3_abort called.
EXT3-fs error (device sda1): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
dir: reading directory /mnt/sda1: Input/output error
root@ubuntu:~#

So, I guess it failed.

Now I get:
Code:
root@ubuntu:~# umount /dev/sda1
ext3_abort called.
EXT3-fs error (device sda1): ext3_put_super: Couldn't clean up the journal
root@ubuntu:~#

and:

Code:
FATAL ERROR: Cannot open disk drive
                          Press any key to exit cfdisk

...even after reboot. Bye bye USB thumbdrive. $40 US down the drain, crap.

***
EDIT
***
For the record, it wasn't dead for long- goto page 2 for the gory details on it's ressurection.
« Last Edit: 24 July 2010, 07:31:44 pm by JustaGuy » Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!