Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sun Jul 22, 2018 9:33 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 31 posts ]  Go to page 1 2 3 Next
Author Message
PostPosted: Fri Jul 18, 2008 5:43 am 
Offline
Newbie

Joined: Fri Jul 18, 2008 3:35 am
Posts: 22
Is there any way to boot a Linkstation Pro/Live (v2) from an external USB drive? Or failing that, is there any way to boot from the internal drive, but have the root partition on an external drive?

I'm trying to make my Linkstation a REALLY low-power device by having the hard drive powered down most of the time. I want to have the root filesystem (and a small data volume with my most-accessed data) on a USB flash drive and my less-frequently accessed data on the internal HD. Then I can use a spindown tool to spin down the hard drive for probably 90% of the time.

But it all hinges on a way to eliminate reads and writes to the internal drive, and to do so effectively, I think I need to move the root filesystem to a flash drive.

I saw this thread:

http://buffalo.nas-central.org/forums/viewtopic.php?f=18&t=6211

where lb_worm discussed having hacked up some code to select a boot device, but the thread petered out without a real product. It sounds very much like what I'm after. Is there any other solution?

_________________
Linkstation Live v2 running: pvr on Hauppauge HVR-950, apache, nfs v4, samba, cups, streamripper, Nikon webcam, weather station (via open 2300)


Top
   
PostPosted: Fri Jul 18, 2008 5:24 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
have you checked out lb_worm's latest micro-evtd w/ the standby feature? this might be enough to meet your needs.

the thread you linked to is interesting and shows some progress - I didn't realize that he had taken it as far as the thread says... it looks like it uses some post-initrd stuff rather than uboot manipulation , but he doesn't give the details it seems.

how much power are you interested in saving? the LSpro/live uses only about 22 watts - I'd guess w/ the hdd on standby it is less than that...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
   
PostPosted: Sun Jul 20, 2008 4:20 am 
Offline
Newbie

Joined: Fri Jul 18, 2008 3:35 am
Posts: 22
Thanks for that information. I looked at what appears to be lb_worm's latest micro-evtd package, and if I read it right, it looks like it's putting the whole system into standby mode. If so, it's not what I need. I want the CPU/RAM & USB drive to be "always on"...I just want to spin down the hard drive.

As to what my target watts are...I don't know...the Linkstation Live - the HDD, I guess. I haven't pulled the HD and turned on the system, but I have a Linksys NSLU2 that pulls about 8-9 watts with a USB drive attached, and about 25-30 watts with an external HD spun up & running. So I'm hoping that a Linkstation with the internal HD spun down will be in the 10w range. Imagine...a gigabit NAS box running on only a couple of more watts than a night light... :D

_________________
Linkstation Live v2 running: pvr on Hauppauge HVR-950, apache, nfs v4, samba, cups, streamripper, Nikon webcam, weather station (via open 2300)


Top
   
PostPosted: Sun Jul 20, 2008 8:15 am 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
Well, we can work together, i have the same target in mind.

My only advantage is that i have a KuroPro with 256MB flash. Still didnt come around to trying to put /bin/, /var/, etc. on the flash though.

The real problem is that stock u-boot (also the recompiled ones) dont have USB support integrated, so if we want to get it going from the very start, we'd need to port one of the modern u-boot versions with usb support (not very practicable i guess).

Another idea (probably the better aproach), is to let the system start from HDD as usual and rebind everything to an usb stick once the kernel has loaded usb-support, or something similiar to that (i.e. executing progs not from /bin and friends but locally from the usb-stick).

First things i suggest is using lm-profiler from the laptop-mode-tools package to see which programs write to your disk (you better delete all the \n's in the script or its output gets unreadable).


Top
   
PostPosted: Sun Jul 20, 2008 7:13 pm 
Offline
Newbie

Joined: Fri Jul 18, 2008 3:35 am
Posts: 22
I think that a modified bootloader would only be necessary if you wanted to have your boot and root filesystems on a flash drive. While that would be nice, I think I could easily live with having the boot filesystem on HDD and the root on a USB stick.

What I'm hoping for is a way to boot from the HDD's boot partition, but then redirect the root filesystem to the USB stick (kind of like the 'root=' kernel command-line option used in grub).

If that's not possible, then I agree that the next best thing might be to boot from the HDD then redirect everything to a USB stick. The problems with this are:

  • it's not easy to figure out what all to redirect
  • it makes it difficult to keep the USB stick up to date as software packages are updated

I'm sure they could be lived with, but I'd really like to see a way to redirect the root filesystem.


Top
   
PostPosted: Mon Jul 21, 2008 2:03 pm 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
Well it doesnt seem that hard to get it going:

1) Boot the kernel from /boot (Harddisk or flash)

2) Set the root device to /dev/sdX or /dev/mtdblock5 once the kernel has loaded the usb-modules/nand drivers.

Several considerations to this:

a) Booting will be slooooow ;), since USB and NAND are rather slow compared to the harddisk interface. We wont boot 50 times a day, so this isnt really important (actually my system has uptimes of several months).

b) well, sort of a), everything modifying the root device on flash will tend to go on slowly (i.e. apt-get update && apt-get upgrade). But as soon as the daemons have loaded themselves into RAM things should go on smoothly.

c) swap: Since all LS'es and relatives are low-spec machines we dont have much RAM and things get swapped out. On the contrary, and out of the same reason one cant run many services on a LS (most often a File Server, a time server, some sort of p2p, rarely mythtv or similiar and a webserver (i'd suggest tinyhttpd for memory-footprints-sake).
As a consequence, swap usage is at 100MB at max.
Thats a dimension which we should consider to be suitable for a flash disk (the integrated wear-leveling mechanisms should make sure the usb stick doesnt get worn out too fast, when comparing the 100MB swap file to an usb stick with 4gb obtainable at every store).

d) wear-leveling:
As explained in b) and c) we should try to minimize the stress done to the flash device. In the depicted use-case in c) the big writers are the p2p app and mythtv, which tend to produce huge amounts of data. Its therefore not advised to let them have their working directories on the flash itself.
noatime (fstab) should be used, ramrun enabled in /etc/defaults/, putting some /var directories to RAM.
Which leaves us to do something with /var/log, which is modified quite often. Several solutions exist:
- use a syslog host on another machine for receiving all events
- put /var/log to flash too (that wears your flash, but it being around 100MB too if big, one can consider it)
- put it into the tmpfs (but this costs you very much RAM)
- disable syslogd and klogd (if you are very sure your systems works as expected)

I dont think that the filesystem gets modified that extremely often after doing this so your stick wont get worn out in reasonable time (lets say 3 years). When doing a test run with lm-profiler i only got some few write accesses from mlnet (mldonkey) and smbd (whose data i wouldnt put on an usb-stick/flash anyway) for 10 minutes and some read accesses (which are completely irrelevant for flash memory).

Summary:

If we use an usb-stick big enough, keep the footprints of our programs low, mount the data direcories of space hoggers (p2p and consorts) on the hdd we should get a system that boots slow but operates fast. But, the more data gets swapped out the slower it gets (but that aint new when using embedded machines,anyway ;)).


Last edited by stjopa on Mon Jul 21, 2008 3:52 pm, edited 3 times in total.

Top
   
PostPosted: Mon Jul 21, 2008 2:35 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
This a great thing to see - how fast ideas pop up and how equally fast folks get going with them here ....

Are you all thinking of developing something natively, with off the shelf parts? Will this be just for ARM9?

Or are you thinking of developing it with a cross compiler? If you do that then it would be easier to translate it to other platforms, using something like OpenEmbedded. Currently some folks are working on foonas (foonas.org) - foonas-em and foonas-iscsi. Assembling such an image that one would simple untar on a pen drive might be very, very easy with OE and bitbake.

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
   
PostPosted: Mon Jul 21, 2008 2:56 pm 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
We wont re-invent the weel here ;).

Frankly i dont think that much tinkering is necessary. Its very similiar to your lenny installation procedure, davy-gravy.

Just that we will untar your rootfs onto the usb-stick and tell the bootloader to use it as root device in the booting process.

The rest is some flash-use optimization so that the usb stick doesnt get worn out, but it would work well without doing all that too, i guess (you just have to replace your stick faster :)).

Im still at work but i will try it out when im home today. Basically this should work without modifying the kernel, so we wont need OpenEmbedded and friends.

How big is your rootfs if untared?


Top
   
PostPosted: Mon Jul 21, 2008 4:11 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
To be honest, I've never tried booting from USB on these things. Actually, I thought that the UBoots (stock, my 2 versions) were all pretty much USB blind... but I don't know that for a fact. The good thing is that the kernel I rolled has usbcore built in. Don't know if that is enough. (the config I use is based on the foonas one, but expanded quite a bit now. It is very, very different to the official Lenny Armel kernel config, which seems to have many fewer builtins.)

My image is about 170MB untarred.

To be honest (and certainly not to sound partisan :) ), I personally lean _away_ from Debian a bit, since I've worked w/ foonas. I just built the image and support it a bit because users say they want such an image. For me, foonas is lighter/smaller, a lot more nimble and when finished, the web interface will be something very good for Joe User.

If this Debian-esque setup/outlook works for you, I may try to build something similar w/ foonas, as well.

EDIT: Currently for a V2 LSPro, I use:
Code:
bootcmd=ide reset; ext2load ide 0:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw ; bootm 0x00100000


Do we need to know what block device the USB flash drive is?
Code:
mtd: Giving out device 0 to physmap-flash.0
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
sl811: driver sl811-hcd, 19 May 2005
Initializing USB Mass Storage driver...
usb 1-1: new high speed USB device using orion-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.


What should this be changed to then?
Code:
root=/dev/sda2 rw

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
   
PostPosted: Thu Jul 24, 2008 3:49 am 
Offline
Newbie

Joined: Fri Jul 18, 2008 3:35 am
Posts: 22
stjopa wrote:
Well it doesnt seem that hard to get it going:
...

I agree with most all of your points. A couple of comments though...
  • I'm actually moving up from a Linksys NSLU2 ("slug") with only 32 MB of RAM, so the 128 MB in the Linkstation seems vast. :lol:
  • I'm currently running my slug's boot/root drive from flash (a 1 GB Corsair Flash Voyager), and the boot time doesn't seem that long. Newer flash drives (like Corsair's Flash Voyager GT) can read at over 20 MB/sec., so I don't think a few more seconds to boot will really matter.
  • I'm not concerned about the HDD spinning up a few times a day (when I'm actively using it for a file server. I just want to be spun down for the other 23 hours. :)
  • I agree about the memory footprint, especially for those running lots of stuff. But in my case, I'm actually running a 16 MB RAMdisk and logging data to it (then copying to the hard drive and/or flash drive a couple of times a day), even with apache, smb, nfs & other stuff running.
  • I'm sure that writes WILL become an issue over time, but as you say, with current wear-leveling techniques and a 2- or 4 GB flash drive, I'd think that 3+ years would be quite doable. And by that time, you'll be able to replace it for US$5 or so. :)
  • With a bit of tweaking to minimize syslog activity (and log to RAM) noatime, etc., I too am only seeing a couple of writes in a 10-minute check with lm-profiler.

So, do you have any idea how you'd accomplish your comment about
Quote:
2) Set the root device to /dev/sdX or /dev/mtdblock5 once the kernel has loaded the usb-modules/nand drivers.

Are you suggesting a file in /etc/init.d that would switch the root volume in the middle of booting? Have you tried this yet? I don't have a serial cable installed yet, so I'm a bit nervous about modifying the boot sequence too much.

P.S. Have you found a utility which will shut down the internal SATA drive (in a Freelink Debian setup)? I've tried a couple of things (sg_start from sg3_utils & noflushd) without success. sg_start works on my external IDE enclosure though...

_________________
Linkstation Live v2 running: pvr on Hauppauge HVR-950, apache, nfs v4, samba, cups, streamripper, Nikon webcam, weather station (via open 2300)


Top
   
PostPosted: Thu Jul 24, 2008 9:07 am 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
I suggest that the root file system is on the USB stick (i.e. root=/dev/sdX).

As a tool i use plain old hdparm, the newer kernel (.25) communicates to the harddisks directly, not via scsi-commands. Only the usb stick still resides on the scsi (and usb) subsystem.

hdparm -y (or -Y?) /dev/hdX does the job.

P.S.: Your external hd should work with hpdarm, too. This is kinda tricky since the enclosure has some kind of USB/SATA <-> IDE/SATA conversion controller (whatever your enclosure is) and this can cause the drive to be recognized as scsi and not as pata/sata drive. Use sdparm --command=stop /dev/sdX if it is recognized as scsi.

Btw i contributed a large portion of the USB harddisk spindown page over there at nslu2-linux.org, so you'd better read that too if things dont work out nicely ;).

@davy_gravy: sorry didnt see your post since you edited the last lines in. Yes, simply use the usb stick as root. We need to know the drives device name before of course. I'd guess its following the normal drive scheme, so it has to be (assuming you have one disk called /dev/sda) - /dev/sdb (i.e. /dev/sd"numberofharddrives"+1)

P.P.S:
Code:
 apt-get install hdparm sdparm 


P.P.P.S.: Knowing the block device is only necessary for devices that are accessed by some block emulation layer (like NAND), not for ordinary harddrives or sticks.


Top
   
PostPosted: Thu Jul 24, 2008 1:58 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
stjopa : This one ? http://www.nslu2-linux.org/wiki/FAQ/Spi ... BHarddisks

hdparm and sdparm are old friends for me ... :)

What bootloader does the slug have? I'm curious about its capabilities vs. that of UBoot.

Code:
bootcmd=ide reset; ext2load ide 0:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rw ; bootm 0x00100000
??

EDIT: Well, that's what I tried before ... sdb1 is ext3, and ext3 is built-in to the kernel (not a module) ...
Code:
egiga0


 [PRIME]
 
 _____ _____ _____     _____         _           _               
|   | |  _  |   __|___|     |___ ___| |_ ___ ___| |  ___ ___ ___ 
| | | |     |__   |___|   --| -_|   |  _|  _| .'| |_| . |  _| . |
|_|___|__|__|_____|   |_____|___|_|_|_| |_| |__,|_|_|___|_| |_  |
                                                            |___|
 
 
 
 
 
Using 88E1111 phy

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 1: OK
Model: WDC WD2500JD-00HBC0                      Firm: 08.02D08 Ser#:      WD-WCAL77520516
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)

Using device ide0, partition 1
** Bad partition 1 **
Using device ide1, partition 1

Loading from block device ide device 1, partition 1: Name: hdb1
  Type: U-Boot  File:/initrd.buffalo

2322728 bytes read
Booting from Device 1
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
switched to TFTP boot.
<<system_bootend>>
Hit any key to stop autoboot:  0
=> ide reset       
ide reset

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 1: OK
Model: WDC WD2500JD-00HBC0                      Firm: 08.02D08 Ser#:      WD-WCAL77520516
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)

=> ext2load ide 0:1 0x00100000 /uImage
ext2load ide 0:1 0x00100000 /uImage
Using device ide0, partition 1
** Bad partition 1 **
=> ext2load ide 1:1 0x00100000 /uImage
ext2load ide 1:1 0x00100000 /uImage
Using device ide1, partition 1

Loading from block device ide device 1, partition 1: Name: hdb1
  Type: U-Boot  File:/uImage

2230788 bytes read
=>  setenv bootargs netconsole=6666@192.168.11.150/,@192.168.11.149/ root=/dev/sdb1 rw
 setenv bootargs netconsole=6666@192.168.11.150/,@192.168.11.149/ root=/dev/sdb1 rw
=> bootm 0x00100000
bootm 0x00100000
<<stop_sound>>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.25.6
   Created:      2008-07-20  19:13:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2230724 Bytes =  2.1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

arg:netconsole=6666@192.168.11.150/,@192.168.11.149/ root=/dev/sdb1 rw
Linux version 2.6.25.6 (davygravy@bitbaker-i686) (gcc version 4.2.2) #1 PREEMPT Sun Jul 20 14:13:12 CDT 2008
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
Machine: Buffalo Linkstation Pro/Live
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: netconsole=6666@192.168.11.150/,@192.168.11.149/ root=/dev/sdb1 rw
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [tty0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125312KB available (4168K code, 251K data, 132K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 540 bytes
NET: Registered protocol family 16
Orion ID: MV88F5182-A2. TCLK=166666667.
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 979, nTxLock = 7834
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
MV-643xx 10/100/1000 Ethernet Driver
eth0: port 0 with MAC address 00:00:00:00:51:81
eth0: Scatter Gather Enabled
eth0: TX TCP/IP Checksumming Supported
eth0: RX TCP/UDP Checksum Offload ON
eth0: RX NAPI Enabled
netconsole: local port 6666
netconsole: local IP 192.168.11.150
netconsole: interface eth0
netconsole: remote port 6666
netconsole: remote IP 192.168.11.149
netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
netconsole: device eth0 not up yet, forcing it
netconsole: carrier detect appears untrustworthy, waiting 4 seconds
console [netcon0] enabled
netconsole: network logging started
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
sata_mv sata_mv.0: version 1.20
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 29
ata2: SATA max UDMA/133 irq 29
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: ATA-6: WDC WD2500JD-00HBC0, 08.02D08, max UDMA/133
ata2.00: 488397168 sectors, multi 0: LBA48
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      WDC WD2500JD-00H 08.0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda4 < sda5 sda6 sda7 >
sd 1:0:0:0: [sda] Attached SCSI disk
sd 1:0:0:0: Attached scsi generic sg0 type 0
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
physmap platform flash device: 00040000 at f4000000
Found: SST 39LF020
physmap-flash.0: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
mtd: Giving out device 0 to physmap-flash.0
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
sl811: driver sl811-hcd, 19 May 2005
Initializing USB Mass Storage driver...
usb 2-1: new high speed USB device using orion-ehci and address 2
usb 2-1: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
rtc-rs5c372 0-0032: rs5c372a found, am/pm, driver version 0.5
rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFP support v0.3: not present
rtc-rs5c372 0-0032: setting system clock to 2008-07-24 13:47:28 UTC (1216907248)
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
VFS: Cannot open root device "sdb1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0100      32768 ram0 (driver?)
0101      32768 ram1 (driver?)
0102      32768 ram2 (driver?)
0800  244198584 sda driver: sd
  0801     987966 sda1
  0802    9775552 sda2
  0804          1 sda4
  0805     506016 sda5
  0806    9775521 sda6
  0807  223150851 sda7
1f00        256 mtdblock0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
   
PostPosted: Fri Jul 25, 2008 3:54 am 
Offline
Newbie

Joined: Fri Jul 18, 2008 3:35 am
Posts: 22
stjopa wrote:
As a tool i use plain old hdparm, the newer kernel (.25) communicates to the harddisks directly, not via scsi-commands. Only the usb stick still resides on the scsi (and usb) subsystem.

hdparm -y (or -Y?) /dev/hdX does the job.

P.S.: Your external hd should work with hpdarm, too. This is kinda tricky since the enclosure has some kind of USB/SATA <-> IDE/SATA conversion controller (whatever your enclosure is) and this can cause the drive to be recognized as scsi and not as pata/sata drive. Use sdparm --command=stop /dev/sdX if it is recognized as scsi.
I'm running duncan_h's kernel 2.6.16.57-lsp_eabi-dh_v4 on a Linkstation Live v2, and the internal SATA drive shows up as /dev/sda, so hdparm won't work. I tried your suggested
Code:
sdparm --command=stop /dev/sda
command, and that returns:
Code:
    /dev/sda: SAMSUNG   HD501LJ           CR10
but the drive doesn't spin down, even though I'm certain that no accesses are going on at the time.

Does the 2.6.25 kernel act differently? I thought that all of the newer kernels use /dev/sdX for IDE/SATA devices. Is this not the case? And can I install a 2.6.25 kernel by just installing the kernel and modules in place of my existing kernel & modules (and updating the boot symlinks)? I'm still not clear...can I mix an eabi kernel with an otherwise oabi system?

Quote:
Btw i contributed a large portion of the USB harddisk spindown page over there at nslu2-linux.org, so you'd better read that too if things dont work out nicely ;).

And my thanks and compliments to you for that! It was what I used to get my slug drive to spin down (I was successful with "sg-start --stop --pc=2 /dev/sdb").

Quote:
@davy_gravy: sorry didnt see your post since you edited the last lines in. Yes, simply use the usb stick as root. We need to know the drives device name before of course. I'd guess its following the normal drive scheme, so it has to be (assuming you have one disk called /dev/sda) - /dev/sdb (i.e. /dev/sd"numberofharddrives"+1)

Does the kernel need any special stuff compiled in to deal with a USB-based drive that early in the boot process? Would the bootloader need to explicitly support USB drives if the boot volume was on SATA, but the root was on USB?

Also...
davy_gravy wrote:
What bootloader does the slug have? I'm curious about its capabilities vs. that of UBoot.
I think it uses RedBoot (http://sourceware.org/redboot/...also http://nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot)

And davy_gravy, can you comment a bit more on why you prefer fooNAS? I can agree that for newbies it'd be easier to use, but from the little that I've looked at it, it doesn't appear to me that it's kept as up-to-date (kernel and software-version-wise) as the Debian stuff, nor does it appear to have the breadth of packages. I suppose it's a matter of personal preference, though...


Top
   
PostPosted: Fri Jul 25, 2008 5:41 am 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
well, foonas is not quite finished yet, but work continues on it. foonas-em is released and represents by far the best EM capability the community has seen so far. foonas-iscsi will offer a very powerful option for sharing a hdd over network when it is finished. all of these are tailored to an NAS situation. Debian is powerful, but with universality come some attributes of an OS that is perhaps a bit large-ish for our boxes... enough with philosophy though... :)

It doesn't seem to want to boot ... my config is here : ext2/3 and usb storage are builtin... for some reason it isn't recognizing it ... don't know what the issue is ... http://buffalo.nas-central.org/download ... bles_n_VPN

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
   
PostPosted: Fri Jul 25, 2008 8:31 am 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
ahagge wrote:
Does the 2.6.25 kernel act differently? I thought that all of the newer kernels use /dev/sdX for IDE/SATA devices. Is this not the case? And can I install a 2.6.25 kernel by just installing the kernel and modules in place of my existing kernel & modules (and updating the boot symlinks)? I'm still not clear...can I mix an eabi kernel with an otherwise oabi system?

Well, yes, no and kinda no.
Overall device support has improved (e.g. you dont need marvell emulation anymore when using smartd) for spinning down disks in 2.6.25 (at least in my eyes).
I'd strongly recommend reinstalling your system using an eabi rootfs, its simply the better and cleaner solution (you can reuse your smb.conf and /var/lib/samba and so on, so its pretty easy).

Quote:
Does the kernel need any special stuff compiled in to deal with a USB-based drive that early in the boot process? Would the bootloader need to explicitly support USB drives if the boot volume was on SATA, but the root was on USB?


Short reasearch on the topic shows we need scsi_mod , sd_mod , usb-storage as modules. This can be implemented statically (boot script with modprobe scsi-mod ... in it) or dynamically (using udev rules). Dont know if they are compiled in, but probably not because it doesnt work.

Concerning the question if we need usb-support in the bootloader for using usb as root. No, we don't. We would only need it if we wanted to boot DIRECTLY from the usb-stick (i.e. starting the kernel from there too), which we won't (the hassle of porting u-boot wouldnt make up for it).

P.S: davy_gravy your bootlog shows me those modules are already there. As im still not at home (alas, work work work ;)), i cant inspect it myself. If you boot normally (root=harddisk), is the usb-stick recognized and if yes, as which device?).

davy_gravy wrote:
What bootloader does the slug have? I'm curious about its capabilities vs. that of UBoot.
I think it uses RedBoot (http://sourceware.org/redboot/...also http://nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot)

Actually in the modern images its a two-stage bootloader. To make things easy, the preinstalled redboot is used as first stage bootloader (so people dont have to flash their bootloaders because of the bricking danger) and APEX (contained in the kernel image!) is used as second stage bootloader which has great flexibility concerning hardware initialization and kernel command lines (which are flawed in redboot in some sort of way).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 31 posts ]  Go to page 1 2 3 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited