Saturday, January 21, 2012

Linux 101, Distro Transitions, Partitions, and Brief History

Finally, the moment we've all been waiting for! At least it is the case for myself. 

Lets start from where I left off last time. I'm not sure if it was a command at some point which I input that fixed the C compiler, but there definitely was a syntax error when I edited it I received the "Hello world" I needed. This January I started a class at my local college for Linux called "Intro to Linux 101". Our first assignment was to install a new OS. Luckily for me I was already planning on installing Linux Mint Debian Edition (LMDE) Xfce, also already having Ubunty 11.10 (Unity) was a nice step forward. So when it was time to turn in a paper explaining what new OS we wanted to install to use while taking the class I already had all the info. =) Talk about easy, for once! Well, rather than installing LMDE I ended up having to install Blackbuntu; out of the blue.

The reason why I ended up installing Blackbuntu is not of importance right now. The reason I didn't install LMDE yet is I wanted to install it on a new desktop PC with a USB flash drive (I say new but this computer was built to run Windows 98 :S) For this new computer the option to boot from a USB flash drive is not possible, and that puts a damper on my original plans.

What I have decided to do is erase Unity, and replace it with LMDE while dual booting with Blackbuntu. Now, my hard drive on the netbook is only 160 gb, and I am planning on an upgrade in the near future. For now this is the plan. The Dell desktop (which is a DHP) needs to be connected to a router with an Ethernet cable to get an Internet connection before I can install the wireless capabilities. I will install the new OS by creating a disc for it. Except I doubt anything Ubuntu related is going on that now. Currently I am considering Fedora, and eventually down the road I hope to get experience with Debian. Mainly the reason I am leaving Ubuntu all together is I could never establish a strong Internet connection with Unity, and Blackbuntu is running perfectly. So, I have to just leave Ubuntu.

________________________________________________________________________________

In my first Linux 101 class meeting we discussed the history of UNIX™ being the origins of Linux. In the late 70's when DARPA and ARPTNET where in the first phases of creation, UNIX was the OS for very large heavy steal computers that could hold just kilobytes of memory and  were complicated to use. A team of developers at the time on a forum called "UseNet Forum" wanted a better environment to work with. At the time IBM was the big telecommunications company everyone used and ATT bought them out. ATT sold the source code of UNIX to Ken Thompson and Dennis Ritchie (K&D) for $500, and this is how UNIX began to branch apart. They developed several different versions of UNIX (similar to how there is Windows 98, XP, 7, etc) and this is where Linus Torvalds got a hold of it at The University of Helsinki.

Linus started Linux as a kernal and wanted to share his project with anyone who could and would help. Richard Stallman made the Free Software Foundation (FSF) and this is how Linux was created and kept Open Source.

______________________________________________________________________________

In our second class we discussed how to install our new operating system with much of the focus on the partitioning section.

/dev/sda1
/dev/sda2
/dev/sda3

These are the sections that separate the different partitions within the 1st hard disk partition 1, 2, and 3. It stands for "Device Serial Disk". If it were to end in an "sdb1, sdb2, sbd3", then it would be partition 1, 2, and 3 within the 2nd hard disk.

To partition the hard disk you need to create them in three different kinds of folders. These are: /r00t, /swap, and /home.

I will have to write more in my next post about these only because the tempature in the class room was probably just above freezing, and I had so much trouble concentrating that all I really understood was that these three folder are created to save the files while building the OS, and that anything of the partitions that are either 5, 6, or 7 are called extended partitions.

You can read a little bit about how to install a Linux OS from a Linux OS in this page written just briefly by a friend of mine http://tinypaste.com/71e64bb1
_______________________________________________________________________________

I picked up another monitor and (so that equals a total of 3 using a netbook), and a professional keyboard and mouse. I also ordered this for my wireless Internet
http://www.newegg.com/Product/Product.aspx?Item=N82E16833704045
It works like a charm I can't wait to try it on LMDE, and I wonder now how it would have done with Ubuntu 10.04 LTS. This may come up again soon.

I may as well post a little tid bit I found very helpful this link will help you get auto completion in the Terminal. Thanks for reading I hope some of you enjoy and find it helpful.

Sunday, January 1, 2012

Update: Wireless Network, C compiler, and Terminal: on 1/1/12> 1am

2011: remember I was explaining in my first blog that one of my issues was my Internet connection would sometimes not load and give a "Page Not Loading" error? I have since joined as a member to the Ubuntu forums- specifically LinuxQuestions.org, and UbuntuForums.org. I use the aliases "Optima4", and "Pl3th0r4x". I asked for help with my Internet, and one of the members suggested I try this code.

sudo apt-get install bcmwl-kernel-source

echo "blacklist bcma" | sudo tee -a /etc/modprobe.d/blacklist.conf 

echo "blacklist brcmsmac" | sudo tee -a /etc/modprobe.d/blacklist.conf 

echo "blacklist brcm80211" | sudo tee -a /etc/modprobe.d /blacklist.conf

 Reboot


 The reason I was instructed to run these commands is the type of hardware for my Gateway LT-27 netbook. Which is in all honesty not very much a bad computer at the bottom line, although, probably this is the most likely reason I am having so many issues with my Ubuntu installations. (The commands are all written in separate lines, one-by-one, just to be clear with simple results following the 'Enter' key after each.)


Results
At first I was under the impression that my computer had been cleared of all incompatibilities. I thanked the user for his advice, and went about my day.  About 1-2hr into browsing I had to leave for a short while and shut down my PC. Upon returning restarting my computer a display of catastrophe projected! My desktop was in shambles! I have a 19" monitor hooked up to my netbook and the small monitor was squished with two thick black margins on each side, and on the other monitor all the icons were flat on top of each other ...which are all placed on different spaces normally.

Those weren't the only issues.

My menu bar at the top netbook screen was gone, the icons that normally rotate up and down on the left of the Ubuntu 11.10 interface were only half showing. I had also been having trouble with my Terminal previously I let a friend, a Debian user, stop by and he tried to set my Ubuntu Terminal up with some Debian commands which made my Terminal act glitchy. (I will explain more at the end.) Well, now my Terminal seemed to be fine, except it just looked like chaos behind the rest of the monitor. Not-to-mention my Internet stopped connecting on its own without rebooting several times, and then finally resulting in a reboot of my router.


Fix
I semi-fixed everything with my Display Settings, luckily. I also had to restart into Gnome and Alt+Right-Click "add panel", and then move to top, to re-add my menu bar. I was then instructed to remove these commands by:

sudo su

echo "blacklist acer_wmi" >> /etc/modprobe.d/blacklist.conf                                            

exit



Pretty much either put things back to normal or at least gave me back my stable Internet.

_________________________________________________________________________________


Terminal

My Terminal was acting funny from whatever codes I let my friend run.

I couldn't open new tabs, I couldn't copy and paste, and I was also having issues with Terminal "Always on Top".

When my desktop was destroyed and I had to kind of reset things, my Terminal seemed to function properly as a result. Here are a few things I learned after this>

Copy and Paste become:

SHIFT+CTRL+C

SHIFT+CTRL+V                                                                                                                  

Open a new tab in Teminal:


 SHIFT+CTRL+T                                                                                                                        


Also,

Tab                            

Will complete a command if you begin one and Terminal knows what you will want to input.

Right_Click on the Terminal menu bar                                                                                      

will change the setting from "Always on Top".

__________________________________________________________________________________


A quote I heard from someone is, "Linux assumes you know exactly what you are doing ."

Mine is, "The smarter I get the stupider I feel." Obviously, stupid"er" not being a real word.

_______________________________________________________________________________

C compiler

C is a programming language used to write coding such as HTML. Today it is widely used to create programs and such to create software.

One last note I wanted to make tonight was while trying to install the C compiler onto my Linux has been an issue since installing Linux. The issue is still not resolved, but it seems the answer is not far off.

I ran:

sudo aptitude install build-essential                                                                                

sudo gedit first.c                                                                                                                    

This is a typical answer what my code gave me as a result

(gedit:2977): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.EDN36V': No such file or directory 

This gave a few errors, but I wrote my code in the C compiler anyway.

I then ran the next command with these results in these orders:


cc -c first.c                                                               

first.c: In function ‘main’:
first.c:5:7: error: expected ‘;’ before ‘{’ token 



cc -o first first.c                                                             



first.c: In function ‘main’:
first.c:5:7: error: expected ‘;’ before ‘{’ token 



./first                                                                


bash: ./file: No such file or directory 



Output should show as follows

Hello, world


... but it is not.

I also tried running this command to add "gcc". This is where you are to run the codes you input for C, and it has not worked currently.

sudo apt-get install gcc build-essential

The code written in C to build looks like this:





I guess the results should say "Hello world", but I have yet to achieve this since Linux is the first OS I have ever attempted to write in C.


The result I get are the last line of code in yellow.

 The last command I ran in Terminal is:

apt-get update && sudo apt-get install aptitude && sudo aptitude install build-essential


This showed promising results. When I retest later I think I may after have the "Hello World!" I am after.

_________________________________________________________________________________


Updates will be soon.