Linux Blog

Auto mounting a partition

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 10:03 pm on Monday, March 26, 2012

It’s been a while. A while since I’ve had to actually had to manually edit the /etc/fstab to automount a partition. So long, that I searched my blog trying to find out how to do it. To my surprise, I’d never actually written one. If I had, I couldn’t find it. Here’s to you, memory:

According to /etc/fstab this is how it’s done

# <file system> <mount point> <type> <options> <dump> <pass>

For those of us that are human, that can mean very little. What you can do, in hopefully slightly more understandable terms is add a line that looks like this:

/dev/sd[a|b|c][x] /mnt/[location] [filesystem] defaults 0 0

What that looks like in my case is:

/dev/sda5 /mnt/sda5 ext4 defaults 0 0

Save, exit and reboot. Hope for the best :)

Disclaimer – I did manage to find the man page for fstab while searching!

Why you should sign up for my RSS Feed!

Filed under: The Linux Blog News — TheLinuxBlog.com at 5:46 am on Friday, August 22, 2008

Why should you subscribe to my RSS feed?

Thats a good question and there are a couple of reasons I can think of off the top of my head.

For the longest time there was an application that I couldn’t remember the name of but thought the concept was as cool as the other side of the pillow. I remembered the name once an update to that application came into my subscribed feeds. I’m not saying I’ll keep you posted on every application or update that comes out, but I may jog your memory, spark some interest in something, help you figure something out or perhaps give you some ideas of your own.

You’ll be better able to participate, tell me how good/crappy my posts are and tell me I’m wrong or stupid. Either way, participation is good!

By subscribing to my RSS Feed I can tell how many actual readers I have. This is somewhat a measure of achievement or an ego booster for me to know that I have more than one reader.

Quite frankly I think results will vary from person to person and these outcomes are all just speculations but if you feel like making me happy whilst getting some useful information go ahead and click on the subscribe button. While your at it, if you have a Twitter go ahead and follow me on that too.

Just remember to keep your RSS reader open and if you choose not to subscribe to the RSS feed or following me then consider bookmarking thelinuxblog.com, or making it part of your daily routine. If you have any questions or complaints you can always e-mail me at: owen @<thelinuxblog.com> or drop me a comment. Thanks Guys!

Timing your reboots with Twitter support!

Filed under: Shell Script Sundays — TheLinuxBlog.com at 12:01 am on Sunday, July 20, 2008

Firstly, I’d like to start off by saying that all of the concepts in this post should have been covered in other posts, so I will not go into great detail on the specifics of this script. If you need to know more information about any of the commands, check the man page section at the bottom of this page, from the man pages will be examples of other posts covering similar topics.

The purpose of this script for me was to time my reboot times. It could be modified to log the time it takes to replace hardware or add memory, but thats another post. Since we are logging reboot times, we are (hopefully) dealing with small numbers and therefore don’t have to deal with formatting time (at least not for now.)

The script should work on multiple systems that have bash. There is nothing too special about it. It uses the reboot command so the user this is launched as will have to have access to that command. You put the script in the users bin directory and chmod it. The user must also have write access to this. Also, they must have write access to their home directory, but this should not be a problem for most. Line 8 of the script needs to be changed to the user you plan on running this as.

After that test that the timereboot command works by typing timereboot:

[owen@linuxblog ~]$ timereboot
Usage: /home/linuxblog/bin/timereboot {time|ttime|back}

Once that is done, thats a pretty good indication that the script is working. Next, I suggest commenting out the reboot command on line #25 if this is a critical mission and you don’t want to reboot multiple times to get it working. If not go ahead and try the time command. Once your system is back up and your logged in you type the “timereboot back” command, it will then tell you the time taken since your system was done.

Once you have verified that the time works, you can go ahead and add it to your bashrc to automatically perform the action once your logged in. All you need to do is add a line like this:

home/linuxblog/bin/timereboot back

Now, if you want you can try again and see the results automatically.

“Thats great, but how do I post it to twitter?”

Well, there is one last thing that you have to do to get your reboot time posted to twitter. Edit line 55 and change to your twitter username and password. Do the same thing as before to reboot, but use the ttime parameter to log to twitter.

This script, does not post to twitter that you are rebooting (although it could) nor does it format the time, but it works and should give you a starting point if you are interested in doing this. It doesn’t really serve a real purpose other than to inform people how quickly or how slow you reboot. Also, please note that this is not a start up time. This times from when you issue the command until you issue the back command, or log in using the .bashrc method.

If you have any questions about this script or any other idea’s let me know and I’ll be happy to help or implement them for fun.

And here is the Twitter reboot script

Linksys NSLU2 – A Great Linux Box

Filed under: Linux Hardware — TheLinuxBlog.com at 2:35 am on Friday, March 21, 2008

This is a piece of hardware that I have owned probably for about two years now. I thought that it had died therefore it sat in my box of unused computer crap probably for about a year and a half. The other weekend I took this little gem back out of this box and actually un-bricked it. It was a bit of a pain to get it working again from its unusable state. It would never boot up, never beeped. Just stopped with an orange light, I really thought it was toast. So I tried the redboot method (regular upgrade method would not work) and it actually went into redboot. After flashing its memory and reloading firmware I was able to get a some what working Linksys NSLU2.

Now thats over with, naturally after having Linksys’s NSLU2 back to its original state, I had to fix it again. That is install Linux on it. The Linksys NSLU2 already runs Linux so there are a few options on how you can get Linux on the Linksys NSLU2. I opted for the easier install this time which is Unslung. My theory with this was, it has a lot more packages then when I first saw Unslung and my Debian Installation was what bricked the poor little slug. So, now I have a great Linksys NSLU2 that is sitting serving up files and is available to run lightweight applications.

I highly recommend the Linksys NSLU2 to anyone wanting to play around with Linux. It is so easy to get started with and they can easily be picked up for under $100. You don’t need anything special to use the Linksys NSLU2. Windows, Linux, MacOSX and anything with a Telnet or SSH client will work. There are so many things that you can do with Linux on an NSLU2 the options are endless. What are you waiting for? Grab one today!

How to Partition Slackware

Filed under: General Linux,Linux Video Tutorials,Quick Linux Tutorials — TheLinuxBlog.com at 12:14 am on Friday, February 1, 2008

I made this quick video on how to partition Slackware 12


How to partition Slackware 12

You might need to turn up the volume. Let me know what you think of this video and if I should continue to make them.

steps are here for reference:

  1. Boot up the Slackware installation disk
  2. Select a keyboard map (if needed)
  3. Log in as root
  4. Use “cfdisk” to get into the disk manager
  5. Create a swap partition in MB double the size of memory. If you have 256 MB of ram, use 512, 128 use 256 etc.
  6. Change the partition type to swap
  7. Create a root partition on the available space with the full disk
  8. Make this partition bootable with the Linux file system type
  9. write the changes to the disk.

This is a very basic setup. I want to make more videos on various subjects if this one picks up. In the line up is a whole Slackware setup tutorial and possibly various other distributions too. I would like to demonstrate other software and technologies.

Drop a comment and let me know what you think!