2003-11-02 21:05:00

by Martin Wierich

[permalink] [raw]
Subject: turning off harddisk and listen music from ramdisk under Linux

Hi guys,

I want to use a PC to listen mp3-music. Therefore I have to buy a new
harddisk.
I use Linux and I want to turn off all harddisks while listening,
because
they are so noisy. My plan is to let some homegrown software regularly
copy the music data
from a harddisk to a ramdisk and to turn off the harddisk then. Then I
would
listen from the ramdisk.

My questions:
- is this possible?
- how do I turn off a harddisk from software under Linux?
- do I have to buy a special harddisk?
- how does linux react on turning off all harddisks? Can
I cut away any superfluous stuff like CRON and let Linux
also run on a ramdisk? Or do I need some special embedded
Linux distribution?
- or is there a readymade solution?

There are the following circumstances:
- for religious reasons I only use _old_ hardware (64MB, 100Mhz)
- I am planning to have a boot partition just for the sole
purpose of listening to music
- I want to keep this boot partition small: no X windows stuff,
no network and so on. The system should start up very
fast.
- I have a SuSE Linux distribution on CD Rom. I only have a 56K
modem. I don't want to download software for hours.

Any help would be appreciated.

cheers

Martin


2003-11-02 21:19:23

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: turning off harddisk and listen music from ramdisk under Linux

On Sun, 02 Nov 2003 23:04:54 +0100, Martin Wierich <[email protected]> said:

> - for religious reasons I only use _old_ hardware (64MB, 100Mhz)

Note that you'll only be able to fit an hour or so of music in there, and
figuring out how to switch playlists is left as an exercise for the masochists. :)

Other than that, it's pretty straightforward conceptually - just create a very
minimal kernel that supports only your sound card and whatever else you need,
boot it with 'init=/boot/music.sh' or similar, and have music.sh be a tiny
script that mounts your music stuff, copies the files to a ramdisk, then
unmounts the disk and does an hdparm command to spin it down.

If you're clever, you'll think of a way to have an initrd that has all the filesystem
you need on it, except maybe for the actual audio that you'll load from another disk.


Attachments:
(No filename) (226.00 B)

2003-11-02 21:20:55

by Tomas Szepe

[permalink] [raw]
Subject: Re: turning off harddisk and listen music from ramdisk under Linux

On Nov-02 2003, Sun, 23:04 +0100
Martin Wierich <[email protected]> wrote:

> I use Linux and I want to turn off all harddisks while listening,
> because they are so noisy.

Just get a recent Seagate Barracuda drive and enjoy the silence.

--
Tomas Szepe <[email protected]>

2003-11-02 21:28:52

by Rob Couto

[permalink] [raw]
Subject: Re: turning off harddisk and listen music from ramdisk under Linux

for overall project assistance:

http://www.linuxquestions.org

for turning off hard drive after a song load:

hdparm -Y /dev/hdX

for a ramdisk:

mount -t tmpfs none /mnt/ramdisk

or add this to /etc/fstab:

none /tmp/jack tmpfs defaults 0 0

On Sunday 02 November 2003 05:04 pm, Martin Wierich wrote:
> Hi guys,
>
> I want to use a PC to listen mp3-music. Therefore I have to buy a new
> harddisk.
> I use Linux and I want to turn off all harddisks while listening,
> because
> they are so noisy. My plan is to let some homegrown software regularly
> copy the music data
> from a harddisk to a ramdisk and to turn off the harddisk then. Then I
> would
> listen from the ramdisk.
>
> My questions:
> - is this possible?
> - how do I turn off a harddisk from software under Linux?
> - do I have to buy a special harddisk?
> - how does linux react on turning off all harddisks? Can
> I cut away any superfluous stuff like CRON and let Linux
> also run on a ramdisk? Or do I need some special embedded
> Linux distribution?
> - or is there a readymade solution?
>
> There are the following circumstances:
> - for religious reasons I only use _old_ hardware (64MB, 100Mhz)
> - I am planning to have a boot partition just for the sole
> purpose of listening to music
> - I want to keep this boot partition small: no X windows stuff,
> no network and so on. The system should start up very
> fast.
> - I have a SuSE Linux distribution on CD Rom. I only have a 56K
> modem. I don't want to download software for hours.
>
> Any help would be appreciated.
>
> cheers
>
> Martin