Linux Blog

How to Partition Slackware

Filed under: General Linux,Linux Video Tutorials,Quick Linux Tutorials — 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!

Creating Dialogs with Dialog

Filed under: Shell Script Sundays — at 5:48 pm on Sunday, October 21, 2007

Have you ever seen those pretty dialogs used in Shell Scripts such as the Slackware installation, the slackpkg program or even the NVIDIA driver installer? Well, my friends to display dialog boxes from shell scripts is very easy with… you guessed it – Dialog.

First of all, there are many different types of dialogs that you can create they are as follows: calendar, checklist, fselect, gauge, infobox, inputbox, menu, msgbox (message), password, radiolist, tailbox, tailboxbg, textbox, timebox, and yesno (yes/no).

This blog post is intended to be a primer on using dialog. More examples will be posted in future blog posts in the Shell Script Sunday’s column.

The simplest form of a dialog in a shell script is probably the msgbox. All this really does is displays text. To display text in a dialog you would do the following:

owen@the-linux-blog:$ dialog –msgbox “Hello from the Linux Blog!” 5 50

The numbers after the text in quotes are the widths and heights of the box. The minimum height that I like to use is 5. The width doesn’t really matter as long as it is big enough. It is good to keep the box sizes standard across a whole script because it gets annoying with constantly resizing boxes.
If the text in a message box is too long it will auto wrap around and give you a type of scroll bar. As follows:

owen@the-linux-blog:$ dialog –msgbox “Hello from The Linux Blog. This text is so long it wraps it to a New Line” 5 50

Dialogs can be canceled. Clicking Ok or pressing enter/return returns “true” and pressing escape or Ctrl+C returns a false.
The simple shell scripting syntax shown in Shell Scripting 101

is used for this:

owen@the-linux-blog:$ dialog –msgbox “Dialog Exit Example” 5 50 && echo “ok” || echo “false”

Another simple dialog example is the Yes/No box. The syntax for this is exactly the same as the msgbox example except instead of using –msgbox, –yesno is used. The difference between a msgbox and a yesno box is that there a two buttons. It is pretty obvious as to what they are labeled, but for those in the back, I’ve included an example and some screen shots anyway.

owen@the-linux-blog:$ dialog –yesno “Are you learning anything from this blog” 5 50 && echo “Yes, thanks Owen.” || echo “No, Write some better Linux Related Posts”

The Linux Blog - Dialog Example - Yes / No

Thats about all I have time for this week. Check back next week!