mintCast 155: GRUB Mysteries

News:

  • OpenSUSE exec says it is an ideal time to have Linux skills. (pcworld.com)
  • Intel releases a graphical installer for their Linux drivers. (omgubuntu.co.uk)

The Main Topic: The Mystery of GRUB

  • GRUB, the GRand Unified Bootloader. “GNU GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading.”
  • How does GRUB know what to boot? It reads /boot/grub/grub.cfg.
    • grub.cfg is written in GRUB’s built-in scripting language, which has a syntax quite similar to that of GNU Bash and other Bourne shell derivatives.
    • The program grub-mkconfig generates a grub.cfg file based on the scripts in /etc/grub.d and the /etc/default/grub file.
    • grub-mkconfig does have some limitations. While adding extra custom menu entries to the end of the list can be done by editing /etc/grub.d/40_custom or creating /boot/grub/custom.cfg, changing the order of menu entries or changing their titles may require making complex changes to shell scripts stored in /etc/grub.d/. This may be improved in the future.
    • The file /etc/default/grub controls the operation of grub-mkconfig. It is sourced by a shell script, and so must be valid POSIX shell input; normally, it will just be a sequence of ‘KEY=value’ lines, but if the value contains spaces or other special characters then it must be quoted.
    • ‘update-grub’ is a stub for running: ‘grub-mkconfig -o /boot/grub/grub.cfg’
  • Simple changes to try…
    • Change the default OS booted:
      • Change GRUB_DEFAULT in /etc/default/grub
      • Run ‘sudo update-grub’ to update /boot/grub/grub.cfg
    • Change the colors of the GRUB screen:
      • Edit /etc/grub.d/06_mint_theme to change these lines:
        • set menu_color_normal=white/black
        • set menu_color_highlight=white/light-gray
      • Run ‘sudo update-grub’
    • Add a background graphic: (Doesn’t work in Mint because of 06_mint_theme?)
      • Move one picture that is the same size as your screen resolution to /boot/grub/ (first one found is used?)
      • Run ‘sudo update-grub’
    • Change the order of the OS list:
      • Involves editing the scripts in /etc/grub.d
    • Recover your system if it won’t boot due to messed up MBR:
      • This can happen if you install Windows after installing Linux, but can also happen if you change hard drive settings or and or remove a hard drive (help.ubuntu.com)
  • GNU GRUB Manual 2.00~rc1. (gnu.org)
  • How to Configure the Linux Grub2 Boot Menu the Easy Way (Uses a program named “Grub Customizer” from a PPA). (howtogeek.com)

Featured Website and Tip:

  • How to measure the speed of your SATA devices from the command line. (linuxaria.com)

Your browser does not support the audio element.

MP3:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast155.mp3[/podcast]
OGG:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast155.ogg[/podcast]

More Information:

Hosts:: Rob, Scott, JamesLive Stream (Mondays at 8:00 p.m. Eastern): mintcast.org

Subscribe: [iTunes] [Zune] [RSS MP3] [RSS OGG]

Contact Us:

Forum: forums.linuxmint.com

Email: mintcast@mintcast.org

Twitter: @mintCast @Linux_Mint @3dbeef @jamescoyner @txhawkins

IRC: irc.spotchat.org – #mintcast

Google+: mintCast

YouTube: mintCast Productions

More Linux Mint info: website, blog, forums, community

Credits: Podcast Entry and exit music provided by Mark Blasco (podcastthemes.com). The podcast’s bumpers were provided by Oscar.

mintCast 150: Podcasting With Jack

News:

[8:15]

  • The Unofficial LMDE KDE distro breaks away, becomes a real Official Distro – SolydXK. (solydxk.com)

Gramps Garage: coreboot

[33:20]

  • coreboot is a Free Software project aimed at replacing the proprietary BIOS (firmware) found in most computers. coreboot performs a little bit of hardware initialization and then executes additional boot logic, called a payload.(http://www.coreboot.org)

The Main Topic: Building a Jack-based Podcasting Server

[42:00]

  • Jack Audio Connection Kit — JACK is system for handling real-time, low latency audio (and MIDI). JACK was designed from the ground up for professional audio work, and its design focuses on two key areas: synchronous execution of all clients, and low latency operation. (http://jackaudio.org/)
  • ArtistX is based on Ubuntu GNU/Linux and contains nearly all the available free audio, 2D and 3D graphics, and video software for the GNU/Linux computing platform. (http://artistx.org/)
  • OpenArtist: A Linux distribution based on Ubuntu. It tries to combine free software into a suite for creative people. Driven by the fact that there are so many cool applications out there, but most people do not know them, openArtist tries to be a complete package of creative software.. (http://openartisthq.org/)

Featured Website: Penguin Producer

[1:30:25]

  • The Penguin Producer is a website dedicated to the advancement of Linux as a viable media production platform. Whether you want to make movies, podcasts, or music; whether it’s intended to be recorded or streamed live, you can find tips, tricks, tutorials, and tool documentation here that can help you bring on your “A Game” in Linux. (http://www.penguinproducer.com/)

Tip:

[1:32:10]

  • Hat-tip to Beardy Jesse for this tip… auto-complete bash commands from history. (linuxfordummies.org)

Your browser does not support the audio element.

MP3:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast150.mp3[/podcast]
OGG:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast150.ogg[/podcast]

More Information:

Hosts:: Rob, Scott, James

Live Stream (Mondays at 8:00 p.m. Eastern): mintcast.org

Subscribe: [iTunes] [Zune] [RSS MP3] [RSS OGG]

Contact Us:

Forum: forums.linuxmint.com

Email: mintcast@mintcast.org

Twitter: @mintCast @Linux_Mint @3dbeef @jamescoyner @txhawkins

IRC: irc.spotchat.org – #mintcast

Google+: mintCast

YouTube: mintCast Productions

More Linux Mint info: website, blog, forums, community

Credits: Podcast Entry and exit music provided by Mark Blasco (podcastthemes.com). The podcast’s bumpers were provided by Oscar.

mintCast 144: grepsedAWK

mintcast144.mp3
mintcast144.ogg

News:

  • [ 9:20] Developers at the Treasury Board of Canada create popular open source project. (wired.com)
  • [13:10] Fedora 18 – Spherical Cow will be released on Jan 15th. (linuxuser.co.uk)
  • [14:45] Lego goes Linux. (internetnews.com)
  • [19:02] IBM’s Watson undergoes brainwashing to forget all the naughty words in the Urban Dictionary. (techdirt.com)
  • [22:00] The White House responds to a petition calling for the construction of a Death Star. (techcrunch.com) (petitions.whitehouse.gov)

Continue reading

Episode 89: Charles on Writing

News:

The Main Topic: Writing Essentials

Featured Websites:

Your browser does not support the audio element.

MP3:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast089.mp3[/podcast]
OGG:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast089.ogg[/podcast]

More Information:

Hosts: Harrison, James, Rob, Scott

Subscribe to the podcast: [iTunes] [Zune] [RSS MP3] [RSS OGG]

Contact Us:

Forum: mintCast

Email: mintCast@mintcast.org

Phone:1-832-514-2278

Twitter: @mintCast @Linux_Mint @3dbeef @jamescoyner

IRC: irc.spotchat.org – #mintcast

More Linux Mint info: website, blog, forums, community

Podcast Entry and exit music provided by Mark Blasco (podcastthemes.com). The podcast’s bumpers were provided by Oscar.

Episode 88: Linux Firewalls

News:

  • Open Source Software continues to make inroads in the Enterprise (itweb.co.za)
  • David Gewirtz link-baits for ZDNet with an article titled “Why I’ve finally had it with my Linux server and I’m moving back to Windows“ (zdnet.com)
  • Steven J. Vaughan-Nichols responds (zdnet.com)
  • Another Journalist gives up Windows 7 for two weeks to try out Ubuntu 11.10 (networkworld.com)

Linux Firewalls:

Featured Website:

Your browser does not support the audio element.

MP3:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast088.mp3[/podcast]
OGG:[podcast]http://mintcast.org/wp-content/uploads/mintcast_published/mintcast088.ogg[/podcast]

More Information:

Hosts: Harrison, James, Rob, Scott

Subscribe to the podcast: [iTunes] [Zune] [RSS MP3] [RSS OGG]

Contact Us:

Forum: mintCast

Email: mintCast@mintcast.org

Phone:1-832-514-2278

Twitter: @mintCast @Linux_Mint @3dbeef @jamescoyner

IRC: irc.spotchat.org – #mintcast

More Linux Mint info: website, blog, forums, community

Podcast Entry and exit music provided by Mark Blasco (podcastthemes.com). The podcast’s bumpers were provided by Oscar.

MythTV walkthrough – Software/Backend

In response to my own part one video on MythTV I thought I would link to the last 5 parts of the series I recorded bringing you from bare metal to a watching TV in about an hour.

And here is the setups specifically for configuring the MythTV backend.

The widescreen videos don’t really line up right now with our WordPress theme but I think giving good quality is worth it. Click on the videos to be redirected to my youtube channel and you can watch the HD versions there.

I want to learn to write programs

On our last show we answered a mail from one of our listeners, who asked: I want to learn to write programs in Linux. This is not the first time I have seen some variation of such a request, and it won’t be the last. There are numerous answers available all over the Internet, and here is one more. :)

Very often I find that the answer concentrates too much on the selection of a language. I find it especially amusing when someone quite knowledgeable asks: what program do you want to write? In my opinion, most beginners have no idea what they are getting themselves into (that is why they are asking in the first place), and further in my opinion it does not make one a good programmer if they know any particular language, or even a number of languages, particularly well. What makes a good programmer is knowing what different tools (languages, packages, etc., etc.) do, and why, and how. Don’t get me wrong, selecting the first language is important, but the answer given to the beginner should always be: start with Python.

I will next attempt to justify this. If you do not care for a justification skip the next paragraph! Warning: all of the following are just my opinion of how the world works; if you do not appreciate sarcasm, you should stop reading now (and probably contact your Internet provider and beg them to permanently disconnect you).

There are many programming languages out there, each with a different goal in mind. At the low end of the scale are languages meant for beginners at a primary school level, such as BASIC or LOGO. These are languages that are intended to introduce some very basic concepts, but most people should outgrow such a language within a week of study. If not, that is a good indicator that programming is probably not for you. Next step up in my scale are all other scripting languages: Python, Ruby, Perl, and many many others. These are languages that intentionally abstract certain nuances of programming (like type casting, for example) which the beginner does not want to be bogged down with. However, they do introduce some programming concepts that although advanced are very good to learn as soon as you can (like functions and classes). As such, these languages are very good at quickly prototyping ideas, and even being used in production where security or speed are not of primary importance. Next step up are semi-compiled languages like Java and C#. These are almost real languages in that they allow you to manipulate software at almost machine level, but they still abstract some of the dirty work like actually porting code to different machine platforms. Although many beginner-level tutorials exist for Java, I personally strongly advise true beginners against picking this language as their first choice, as you will immediately get bogged down with all the dirty stuff. Next step up from this are, what I call real languages: C, C++. These languages allow you to manipulate software at the hardware level, if you chose to, and will run directly on the hardware without someone else’s interpretation of what you wanted your program to do. With such power comer great responsibility: you often have to perform many meaning tasks, such as cleaning up after yourself. The pinnacle of programming languages is assembler and machine language. No person programs in these languages today, only machines program other machines in assembly.

Just to give you some idea of what you can expect from each of these. Using BASIC, you can make text appear on the screen, and make funny (to a 3 year old) beeps come out of the speaker. If you are familiar with Linux Mint, which I assume many readers of this blog are, most of the Mint-specific tools are written in Python. The application Tomboy is written in C#. No serious desktop applications are written in Java or C#. These language are widely used only in Internet application because of their (often false) promise of OS and hardware non-dependence. The desktop environment GNOME is probably (I have not checked) written primary in C++. The Linux kernel is primary written in C and C++, with some small parts in assembly.

I am currently in the process of putting together a beginner-level course. First a little background on it. At the beginning of this year I had a little time off (downsized) and was looking to pick up another scripting language. In my line of work (software test), there is not much need for compiled languages, but to transition up to one would be quite easy as the concepts of structuring a computer program are the same regardless of the language. By coincidence, my son, whom I had give an old laptop and a Linux Mint CD, was on his own getting quite into Blender; which is an application that can be greatly enhanced with a scripting language: Python. So that is how the decision was made as for the language.

Having worked in the computer industry for about 10 years, I already had a pretty good idea of what a normal day for a software developer is like and what sorts of tools they use. I wanted to take my son “quickly” (say one year) from “playing around with stuff” to using professional level tools, so that he could make a decision 1) if he wants to continue along this career path, and 2) where exactly within that field he wants to go – even in software development there are way too many specialities. I found some tutorials online that are intended for teenage kids who are just starting out in computers – programming games – and I used those to build upon. My son is also homeschooled, and because of that I had to come up with a syllabus; here it is: http://siking.wordpress.com/programming/. I actually came up with this just recently, with the thought that there are other homeschooled kids around that may be interested in the same thing. But being a teenagers is certainly not a prerequisite!

If you get into the course I can offer help; leave a comment / request at the above link.

Upgrading Linux without having to manually reinstall programs

So now that Linux Mint 6 is out what do you do? Do you update or do a fresh install? Updates are easy, but fresh installs usually work better. But what about all that stuff you installed and settings you made? I am going to give you a few commands to do a fresh install and keep all the stuff you installed.

First I would like to explain the easiest way to keep your documents and settings. When you are installing Linux Mint create a separate partition or use a separate hard drive for your /home directory. Of course this requires repartitioning your hard drive and possibly reinstalling, but to me it seems it is something that a lot of long time Linux user recommend. And if this is the first time you are installing Linux it is something that can help you a ton in the long run. If you are like most first time Linux installers you are probably doing this on a machine that already has Windows installed and you are planning on dual booting the machine though. Keep in mind that setting up your home directory on a separate partition/hard drive DOES NOT keep your programs installed when you do a fresh install.
If you already have Linux Mint installed and are just updating to Linux Mint 6 than the below instructions are for you. If you just want to update to Linux Mint 6 without doing a fresh install than you should use the awesome updater program.

First thing I would like to do is give credit where credit is due. I found these instructions (and added some extra stuff) from hehe2.net.

So here is what you do. While you are still using your “old” version of Linux mint open up a command prompt and run this command. Note that throughout this tutorial you are going to replace wherever I have put “rothgar” with whatever your username is on the machine.

sudo dpkg -–get-selections > /home/rothgar/package.selections

*NOTE* those are two ‘-’s and not just one in front of “get-selections”

This makes a list of everything that is installed and saves it to your home folder.

Next we are going to back up all your files. One of the easy ways to do this without missing hidden files or screwing up permissions is to backup your home directory with the tar commend. The tar command is like a zip/rar file for windows.

The command to use is

tar -cvpzf /home/rothgar/Desktop/homebackup.tar ~ —exclude=/home/rothgar/.local/share/trash

Here is what the letters all mean after tar
c = creates a file
v = verbose, shows you what it is doing
p = permissions, keeps your permissions in tact (make sure your new user has the same username on the fresh install)
z = gzip the files, actually compresses the files
f = file, moves files

You can use the —exclude=/home/rothgar/anyfileorfolderyoudontwant to exclude multiple folders by just putting another one at the end of the code. I included the trash folder because I have a nasty habbit of not emptying my trash in Linux Mint.

One you have your home folder all backed up the file should show up on your desktop. Go ahead and backup your /etc folder too so you can have extra configuration files (sources.list, xorg.conf, etc.) that you might need to reference for system wide settings you made. Do that with this command.

tar -cvpzf /home/rothgar/Desktop/etcbackup.tar /etc

Once you have the two tar files on your desktop move them off to a external hard drive. We are going to format your current drive for a fresh install remember? Make sure you verify that everything is there. If for some reason the copy didn’t work there won’t be any easy way to get your stuff back.

Do a fresh install of Linux Mint 6. Trust me, it is as painless as Linux Mint 5.

Once Linux Mint 6 is all installed plug in your external hard drive where you saved all those important files. Go ahead and extract that package.selections file we created in step one and copy it to your new home folder. If you added any special sources to your sources.list file you will need to extract that from the other tar file and make sure you replace all of the versions (Gusty etc.) with the current version (in this case Intrepid). I hope you also checked that the software you installed supports the new version. Otherwise they may not have a repository for the right version. Once you have all your sources added then just run these two commands in a terminal.

sudo apt-get update
sudo dpkg -–set-selections /home/rothgar/package.selections && apt-get dselect-upgrade

This may take a while. It is going to download all the software you had installed before and install it. After everything is installed you will now need to extract the rest of your home folder. To extract open a terminal and browse to the folder you have the tar file stored. Then just run:

tar -vxpvf /homebackup.tar ~

x= extract

This will take all your files, including your setings, and move it to your new home folder. Once the extract finishes just reboot to apply all the settings and you should be good to go. Now it is just like you left it.

Two problems that I thought I would point out that I had were video card drivers and missing icon set. The video drivers were easily re-installed with Envy and the icons I just had to re-download and put them in the .icons folder in my home folder.

If you want more info on the tar command go read on here.

If you have any questions go ahead and leave them in the comments.

Getting the most out of samba

So you should know how to set up samba if you listened to the first MintCast podcast. But what if you ran into problems? I know I sure did. Here are some of the problems I ran into and what I did to fix it…
If when you right clicked on a folder you did not have the “Sharing options” go over to the mintMenu and then click on “Package Manager”. Put in your password and search for “nautilus-share”. You should only have 1 result so just check the box next to it and mark it for installation. Then click apply and you should be good to go.
I already had that option so the first thing that happened to me was when I right clicked on “Sharing options” I got this error.
“‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied. You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.”
I won’t go into the details of why this happens but if you get this problem you will need to edit a configuration file. Don’t get scared this is going to be easy.
There are two ways you can do this without opening a terminal and if you feel more comfortable check out a little how to on setting that up here. Otherwise open a terminal and type “sudo gedit /etc/group”. This will probably ask you for your password and then open gedit with a bit of stuff already inside. Be careful when editing this file! This file is what tells Linux Mint who can use what. I don’t just mean documents either. This tells Linux Mint if you can use your CD drive, hard drive, etc.
All we are going to do is find the line that starts with “sambashare:”. It is probably near the bottom so scroll down and when you find that line you will want to add your user name after the last : on that line. For example I had to add rothgar so my line looks like this now “sambashare:x:112:rothgar”. Once you add that user save and close the file. Log out and then back in. Now you have permissions to create samba shares on your computer.
This was the only problem I ran into when creating a share. If you had any other problems go ahead and post a comment and we will see what we can do to find a solution.

So now that we are past the problems now, so how do you get the most out of samba? To make this easy I use a tool called gsambad. To use this fire up your package manager and search for gsambad and install it.
Here is what mine looked like when I first started it up.
gsambad_01
I know it is a lot of stuff and you don’t have to know what it all means. There are a few places you want to make sure you know what they mean though. First is the server host name. That is the name people can browse to your files assuming DNS works on your network (which it should). You can change your hostname there or under mintMenu -> control center -> network. Workgroup or domain should be whatever you workgroup is where you are using your computer. My workgroup at home is called shoppe and this can also be changed in control center. Allowed hosts and network is important because you will want to make sure the correct networks can browse to your files. My network at home is set up as 192.168.2.X so i had to add that to the list. My network at work is 10.10.133.X so I also had to add that too. Here is my configuration file after a few edits.
gsambad_02

Everything under the “Server settings for advanced administrators:” we can ignore for this tutorial.
Lets look at our users tab. This says what users are allowed on your samba shares. You probably have 3 users listed here by default, your user, smbguest, and root. I would recommend creating users through control center -> users and groups and not through gsambad if you want more people to have access to your samba shares. The smbguest account is for everyone that doesn’t have a local account on your computer.
gsambad_03
If you click on the shares tab you will see all the folders that are shared in your /etc/smb.conf file. A lot are there by default (home, printers, etc.) and these make getting the files you need easier.
gsambad_04

But what about folders you right clicked on and did sharing options for like before? Those files are actually stored in /var/lib/samba/usershares/ as configuration files. Here is a configuration file for one that I set up earlier that didn’t show up in gsambad.

path=/home/rothgar/Desktop/amarok
comment=
usershare_acl=S-1-1-0:R
guest_ok=n

Sure you could just add more files in that folder and that will add more samba shares. Or you can still right click on folders and add them the GUI way, but personally I like setting up all my shares in gsambad or in the /etc/smb.conf file so that I have everything in one place. To add a share click the new share button. Type in the name of what the share will be (anything without spaces or symbols is good) and type in the path to where the folder is that you want to share. I am going to share another folder on my desktop called Banshee. To allow someone to veiw these files you will have to click on “Add access permissions”
gsambad_05

Select where you want to get the user from and if you want to allow access or deny access and if you want to allow this user to write to the folder or not.
gsambad_06
Select what users you want to have permissions and click import users. You will get a couple pop ups (just click close to get back to the main window). Once you are back to the shares windows scroll down to set if you want your share to be read only, writable, etc.
If you set the share to public than you won’t have to put in a username or password to connect to the share. This isn’t good for your home directory. But if you want a public spot for anyone to drop files or get files from you you should make it public.
gsambad_07
As soon as everything looks good just click add at the top and your new share will automatically be written to the smb.conf file. If you ever need to edit the share you can just come back to this tab and change the settings you want changed then click apply at the top.
You probably won’t use any of the other tabs in gsambad except maybe the configuration tab. This tab just shows what the smb.conf file actually has in it. The other tabs can edit this file for you through the GUI but if you want to do it manually you can change that on the configuration tab.
I hope this helps you get on track with samba and how to configure it a little more. Let me know if you have any questions in the comments or send me a email.