Running from the USB drive
I have an application that will put the hard drives in sleep mode while one is running the linux system from a USB drive, such as a 2 GB SanDisk drive.
It's useful as a power-saving feature, and will save wear and tear on the computer's hard drives.
Go here to look at the code for this application, you may download it and try it out, if you are running your system from a USB drive. Be sure and chmod +x the file so it will run.
The application turns all of the detected swap partitions off, then enables the /dev/sda7 swap partition on the USB drive.
See earlier posts on how to set up your USB drive.
The best place to put this file is in the /home/knoppix/download directory, when using a persistent home directory partition (/dev/sda5) on the USB drive. That way, it goes with you when you move the USB drive to another computer. Also, you may want to check the drive numbers on your computer, to see what you have, and modify the script accordingly. It's set up to put /dev/hda and /dev/hdb in Sleep Mode as it is.
Also, I modified the IceWM menu, located at /home/knoppix/.icewm/menu to include an entry to access the application and run it from the menu. I have placed it in the
Menu -> Admin-Tools section, and here is the entry:
You should make it all one line in the ~/.icewm/menu file (except for the "separator" lines), Blogger always cuts these lines of code up into three or so lines, which is not correct for your file.
Rapidweather Remaster makes it easy to work with your menu file, just open emelFM from the toolbar icon, and navigate to the /home/knoppix/.icewm directory, click on menu, then press the "SciTE" button to open the menu in the editor.
Once you get the new line in there, be sure and click on the "X" on the IceWM toolbar to have the IceWM window manager "restart" and show your new menu entry. Just right-click on the desktop, and navigate to the "Admin-Tools" section to see your new entry. If you modify the application in any way, it will run as you have made it, without having to re-do the menu.
As you can see from the source code of the application, it will take all of the drives out of Sleep Mode first, just in case you have run this application earlier. Then it will put them back in Sleep Mode. Always run this application when you first start up the linux system from the USB drive, and arrive at the desktop. The application will cut off all swap partitions, then restart only the one on the USB drive.
I may place this application in the CD in the next Beta Build, but would not want to make a menu item for it, as that could be used, even though the system is not running from a USB drive.
Probably will provide the menu code in the Getting Started Guide, so advanced users, those most likely to be using a USB drive anyway, can set this up. The location for the file would not be in /ramdisk, but in /usr/local/keepers, in the CD. Then it would not depend on a persistent home directory setup, and the ~/download directory would not have to hold this file.
I put the source code up on the internet for you, you can run the file from a root shell in other livecd linux distributions that run from a USB drive, or from the CDROM drive, only.
Stay Tuned!
It's useful as a power-saving feature, and will save wear and tear on the computer's hard drives.
Go here to look at the code for this application, you may download it and try it out, if you are running your system from a USB drive. Be sure and chmod +x the file so it will run.
The application turns all of the detected swap partitions off, then enables the /dev/sda7 swap partition on the USB drive.
See earlier posts on how to set up your USB drive.
The best place to put this file is in the /home/knoppix/download directory, when using a persistent home directory partition (/dev/sda5) on the USB drive. That way, it goes with you when you move the USB drive to another computer. Also, you may want to check the drive numbers on your computer, to see what you have, and modify the script accordingly. It's set up to put /dev/hda and /dev/hdb in Sleep Mode as it is.
Also, I modified the IceWM menu, located at /home/knoppix/.icewm/menu to include an entry to access the application and run it from the menu. I have placed it in the
Menu -> Admin-Tools section, and here is the entry:
separator
prog "HD Sleep Mode" /usr/share/icons/crystalsvg/16x16/apps/terminal.png rxvt -iconic -rv -fb 10x20 -geometry 107x38+10+10 -cr yellow -T "HD Sleep Mode" -e sudo /home/knoppix/download/hard_drive_sleep.sh
separator
You should make it all one line in the ~/.icewm/menu file (except for the "separator" lines), Blogger always cuts these lines of code up into three or so lines, which is not correct for your file.
Rapidweather Remaster makes it easy to work with your menu file, just open emelFM from the toolbar icon, and navigate to the /home/knoppix/.icewm directory, click on menu, then press the "SciTE" button to open the menu in the editor.
Once you get the new line in there, be sure and click on the "X" on the IceWM toolbar to have the IceWM window manager "restart" and show your new menu entry. Just right-click on the desktop, and navigate to the "Admin-Tools" section to see your new entry. If you modify the application in any way, it will run as you have made it, without having to re-do the menu.
As you can see from the source code of the application, it will take all of the drives out of Sleep Mode first, just in case you have run this application earlier. Then it will put them back in Sleep Mode. Always run this application when you first start up the linux system from the USB drive, and arrive at the desktop. The application will cut off all swap partitions, then restart only the one on the USB drive.
I may place this application in the CD in the next Beta Build, but would not want to make a menu item for it, as that could be used, even though the system is not running from a USB drive.
Probably will provide the menu code in the Getting Started Guide, so advanced users, those most likely to be using a USB drive anyway, can set this up. The location for the file would not be in /ramdisk, but in /usr/local/keepers, in the CD. Then it would not depend on a persistent home directory setup, and the ~/download directory would not have to hold this file.
I put the source code up on the internet for you, you can run the file from a root shell in other livecd linux distributions that run from a USB drive, or from the CDROM drive, only.
Stay Tuned!

<< Home