Showing posts with label 2011. Show all posts
Showing posts with label 2011. Show all posts

Sunday, August 4, 2013

Installing Arch GNU/Linux on Macbok air Version 4.2(Late 2011) part 3

Disclaimer: I dont take any responsibility for the damage of your equipment. If you point your ire at me, I will have the last laugh. USE THE INFO AT YOUR OWN RISK.

So, You are not used to being a master. You are used to situations where you adapt yourself to the Operating system(Master) and tells what you should be doing. So, be careful, what happens from now on is different. You tell the Operating system what is to be done and how it is to be done.

Let us begin.

After successful boot u will be logged in as root with the root prompt. Type the commands below as described. Majority of this info has been culled from the Arch wiki.


# nano /etc/hostname
enter your hostname press ^o and ^x to exit


# nano /etc/locale.gen

en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8

# locale-gen
# export LANG=de_DE.UTF-8

#wifi-menu
select your wifi connection from the list given. It will prompt for the password. Give the password and you are connected to the public network.

#cgdisk /dev/sda

Be careful here. remember the partition scheme you had decided in the beginning. delete the partition you had created in osx for linux. Now create a partition and select the type as "linux". cgdisk is an ncurses interface for the gdisk tool. I created only one partition. cgdisk manages a GPT parititon table, rather than the traditional MBR-style partitions. If swap is required we can always create swap on a file in the regular file system. Remember the partition number you created. You can always find out the partition number by

#lsblk /dev/sda

format it to your favorite file system

#mkefs.ext4 /dev/sda5

mount the partition

#mount /dev/sda5 /mnt

Since we are on an efi system, we have to mount the first partition

# mkdir /mnt/boot/efi
# mount /dev/sdax /mnt/boot/efi

 Select a mirror

Before installing, you may want to edit the mirrorlist file and place your preferred mirror first. A copy of this file will be installed on your new system by pacstrap as well, so it's worth getting it right.

# nano /etc/pacman.d/mirrorlist

    Alt+6 to copy a Server line.
    PageUp key to scroll up.
    Ctrl+U to paste it at the top of the list.
    Ctrl+X to exit, and when prompted to save changes, press Y and Enter to use the same filename.

If you want, you can make it the only mirror available by getting rid of everything else (using Ctrl+K), but it's usually a good idea to have a few more, in case the first one goes offline.
Tip: Use the Mirrorlist Generator to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called keepalive. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause.

 Install the base system

The base system is installed using the pacstrap script.

# pacstrap /mnt base base-devel


 Generate an fstab

Generate an fstab file with the following command. If you prefer to use UUIDs or labels, add the -U or -L option, respectively. It's also a good idea to check it before continuing:

# genfstab -p /mnt > /mnt/etc/fstab
# nano /mnt/etc/fstab


 Chroot and configure the base system

Next, we chroot into our newly installed system:

# arch-chroot /mnt

At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.

 Locale

Locales are used by glibc and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.

There are two files that need editing: locale.gen and locale.conf.

    The locale.gen file is empty by default (everything is commented out) and you need to remove the # in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their UTF-8 encoding:

# nano /etc/locale.gen

en_US.UTF-8 UTF-8
de_DE.UTF-8 UTF-8

# locale-gen

This will run on every glibc upgrade, generating all the locales specified in /etc/locale.gen.

    The locale.conf file doesn't exist by default. Setting only LANG should be enough. It will act as the default value for all other variables.

# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8

Note: If you set some other language than English at the beginning of the install, the above commands would be something like:

# echo LANG=de_DE.UTF-8 > /etc/locale.conf
# export LANG=de_DE.UTF-8

To use other LC_* variables, first run locale to see the available options. An advanced example can be found here.
Warning: Using the LC_ALL variable is strongly discouraged because it overrides everything.


Timezone Available time zones and subzones can be found in the /usr/share/zoneinfo// directories.

To view the available , check the directory /usr/share/zoneinfo/:

# ls /usr/share/zoneinfo/


Create a symbolic link /etc/localtime to your zone file /usr/share/zoneinfo// using this command:

ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

Daemons

A list of available services (and their running status) can be found using the command:

# rc.d list


 Hostname

Add your hostname in /etc/hostname:

# echo myhostname > /etc/hostname


Wireless

     Install the required packages:

# pacman -S wireless_tools netctl

If you use WPA/WPA2 encryption, install:

# pacman -S wpa_supplicant wpa_actiond
#pacman -S dialog(for using wifi-menu it is a dependency)

initrd will be generated automatically during the install

#modprobe dm-mod



     Connect to the network with wifi-menu (optionally checking the interface name with ip link, but usually it's wlan0), which will generate a profile file in /etc/network.d named after the SSID. There are also templates available in /etc/network.d/examples/ for manual configuration.

# wifi-menu



GRUB



For 64-bit aka x86_64 UEFI firmware:

# pacman -S grub-efi-x86_64


The UEFI system partition will need to be mounted at /boot/efi/ for the GRUB(2) install script to detect it:

# mkdir -p /boot/efi
# mount -t vfat /dev/sdXY /boot/efi

Install GRUB UEFI application to /boot/efi/EFI/arch_grub and its modules to /boot/grub/x86_64-efi (recommended) using:

# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo


While using a manually created grub.cfg is absolutely fine, automatically generating one is recommended:
Tip: To automatically search for other operating systems on your computer, install os-prober before generating it:

# pacman -S os-prober

# grub-mkconfig -o /boot/grub/grub.cfg

After all this a .efi is installed in /dev/sda1/EFI/arch_boot/
This will read the grub.cfg in /boot/grub/grub.cfg

#passwd    change the root password


pacman -S xorg xorg-apps xorg-drivers xorg-fonts



#mkdir /home/vanisri
#useradd vanisri
#passwd vanisri
#chown  -R  $USER:$USER  $HOME

reboot

Hold the option button. This will choose the previous working refit screen. Here select osX. Once in osX re-install refit.
reboot
Hold the option button and see everything is fine.
reboot
Now you will get back the old refit which you have been using previous to installing arch. This is required since the step to install grub discussed above installed grub to the efi partition thereby overwriting the previous refit and you boot directly into grub instead of refit.


pacman -S xfce4 xfce4-goodies
pacman -S gstream.....
pacman -S firefox
pacman -S flashplugin
pacman -S alsa_utils alsa_oss ffmpeg alsa_plugins libva-driver-intel ttf-dejavu
#cat /etc/group
#gpasswd -a vanisri audio (Like this add yourself to the other groups)

pacman -S lightdm

pacman -Syu


#emacs /etc/rc.conf
HARDWARECLOCK="localtime"
TIMEZONE="Asia/Kolkata"

To display the correct time.

To check whether time is set properly

run the commands below
# hwclock --show
$ date

Both the commands should show the same time. Else run the following

# hwclock --hctosys

Now check the two commands above. They should be the same.


That completes a near 90 percent of Arch GNU/Linux installation on the Macbook air. Little more tips/adjustments/betterments in the next post.


GNU/Linux on Apple Macbook Air 4.2 (Late 2011) part 1

 Disclaimer: I dont take any responsibility for the damage of your equipment. If you point your ire at me, I will have the last laugh. USE THE INFO AT YOUR OWN RISK.

This post is my continuation of my earlier post where I drooled over the hardware implementation of Macbook air. After that post I have seen all the notebook manufacturers try to make a clone and majority have failed except for the samsung versions which have better connectivity options compared to the Air. But Macbook air is still the king in lightweight laptops. Why do I drool over the Airs being a hardcore freedom software evangelist? Hardware, exquisitely crafted hardware.

Let us get down to freeing the Macbook air from propreitory software it is running. I have chosen Arch GNU/Linux as my GNU OS of choice having read reports of it running beatifully on Mac hardware and not interested in running the Microsoft of the windows world, Ubuntu GNU/Linux.
Coming from Debian GNU/Linux, I saw that the ncurses interface for installing the basic OS is very similar. There was a shocker waiting for me. After downloading the latest x86_64 build, I connected the external DVD drive borrowed from my friend and booted it. What happens, The installer starts and dumps me into a root prompt. Thats it. I have installed slackware GNU/Linux and Debian GNU/Linux with neat installers though still ncurses based.

Time to search the public network. Now I see that the ncurses installer has been done away with. You have to install everything manually. Ofcourse there are lot of tools provided by the Arch GNU/Linux project to make the process simple and straight forward. At this juncture I would like to mention about the Arch WIKI. This is one of the most detailed wiki documentation I have gone through seconded or equalled only by the Gentoo GNU/Linux wiki.The wiki is written beautifully and is very easy to comprehend by anybody with a basic GNU/Linux background. In the process, I chrooted to another GNU/Linux installation for the first time and the raw power of the UNIX philosophy hit me on my face. KUDOS to all the "freeedom" developers.





Here are the links/resources/works/efforts I made use of in liberating my Macbook Air.

http://d.goodlad.net/articles/arch_linux_on_mba_42/

http://blog.billsdon.com/2011/12/triple-boot-13inch-macbook-air-4-2-2011-model/

http://www.billsdon.com/2011/12/install-linux-mint-12-lisa-13inch-macbook-air-4-2-2011-model/

http://plopez.nfshost.com/2011_macbook_air_pure_efi_dual-boot

http://calummacrae.blogspot.in/2012/06/control-freaks-macbook-air-introduction.html

http://maketecheasier.com/install-dual-boot-ubuntu-in-macbook-air/2012/08/27

http://www.linuxbsdos.com/2012/10/10/dual-boot-windows-7-and-ubuntu-12-04-on-a-pc-with-uefi-board-ssd-and-hdd/

The next post will be having all the gory details of installing Arch GNU/Linux on the Macbook air.


Sunday, May 19, 2013

My favorite phone Xperia Mini Pro is alive and kicking......

I already have a lot of posts on the favorite phone. I have written all about its features, rooting it, installing custom roms and everything. This post is particularly about the attitude of big corporations and their lethargic attitude towards the customer once a sale is made.

Business institutions are full about various subjects relating to customer satisfaction/customer requirements/repeat customers. Students from these institutions get high packets based on the things they learn from these institutions and are taught about all the ideals of keeping the customers happy.

But once these students end up with big organizations, with a very costly noose around their necks, called the "tie", they are re-programmed to work in the traditional way the whole business is being carried out. The very best example of how these organizations work has been the android eco-system. Being an open eco-system based on apache licence has put into open the negatives of traditional way of customer satisfaction.

Customers these days are over-whelmed with information about products and their features. This information is again adulterated by paid reviews of the product and see that it gets maximum penetration. This is one side of the coin which deals with selling a product to the customer. Now, the android eco-system starts with a sale, while other products end with a sale. Organizations are finding it difficult to assimilate the fact that a sale with open systems, dont end with a sale, in fact it starts with a sale. Customers are eagerly waiting for additional services/product upgrades. So, why are the customers so much demanding? The answer lies in the open nature of the android eco-system

Once a device is released, the kernel code which is under GPL is to be released in parallel. So, what do traditional companies do to continue doing their traditional business? They delay the release of the kernel sources. Now, once the kernel sources are released, there is only one task remaining, build a custom rom for that device with all the updated features available in the AOSP code released.

AOSP is a moving target, being updated everyday with bugfixes and new features from volunteers worldwide. But the device came with a static rom and that is exactly what the big organizations are ready to give you. Well, the customers dont want that, they want their device to be alive as long as it meets their requirement or they can make the device meet their requirement by using upgraded code from the AOSP project.

How do big organizations stop users/devs from doing the above? Create binary only drivers packaged as blobs and Linux supports blobs to be loaded as it is(This is exactly what makes RMS fume on the licensing choice of the linux kernel). Now, without these blobs, the custom built rom would not function out of the box, resulting in a rom, with limited functionality compared to the stock rom which came with the device.

Let me come back to the subject, xperia mini pro. Awesome design for a qwerty phone, little heavy thats it. Its an awesom device. Sony upgraded the software radically only once. They upgraded it to ICS from GB, cribbing all the way about the lack of hardware capability to run ICS throught the build process which took almost an year. After that they orphaned the phone. Another team, the freexperia team which is responsible for bringing cyanogenmod to xperia devices also lifted their hand from upgrading the phones to the next version, JB.  Half hearted attempts were made by them to build cm10 for the 2011 series. Once they saw that the device did live it up to the task, they became serious and we had 4.1 for our phones, then, they stopped and decided that 2013 is too late for 2011

Now, it is the turn of the individuals to expand the life of the device. nAa, did the unthinkable and unimaginable for 2011 devices he started with 3.* kernel and has succesfully built 3.4* kernel for them, But of course he was still standing on giants. You should feel the device in your hands running this fantastic kernel and 4.2.2, the lates branch of android. In fact the 2013 flagship sony devices are still on 4.1.2. The device feels snappy and ready for future android releases. Thanx to all the devs at Cyanogenmod and users/devs at the xda forums, my fav phone has got a new lease of life and is completely rejuvinated.

So, shall we jump to Customer satisfaction 3.0....................

Update:- 14.08.2013

We now have android 4.3 a.k.a Cyanogenmod 10.2 on the Xperia mini pro. Thanx to the efforts of mikeioannina and ofcourse nAa we now have LegacyXperia 4.3 . Go ahead and flash it.

Tuesday, October 9, 2012

Freedom and Macbook air(AKA, "opposites attract")

I would loathe the Macbook pros and see that they were whitey, clumsy, heavy and awkward looking compared to the other notebooks in the industry. Of all the notebooks I liked the HP TX1301au for three reasons

1. It had an AMD Turion x2 processor( A processor developed with notebooks in mind )
2. It had a touch screen
3. It could be converted into what is called a "tablet" today by folding the display over the keyboard.

I saw this lappy being used by many users. HP had a very good concept but did not follow up on this( Just exactly what happened to one of the first professional looking GNU/Linux based touch phone, the motoming or a1200. It was a beautiful phone with a flavor of linux called the montavista linux, It was my first smartphone ). But I was happy with my lappy since It played good with GNU/Linux. Debian GNU/Linux ran on this beauty flawlessly. It was light compared to other laptops. It was smaller at 12" compared to other laptops. I went on and succesfully booted Debian GNU/HURD also on this lappy, but after the initial boot screen It was difficult. In summary, my lappy was free of all propreitory software, except for the nvidia driver(I know, I know, RMS is angry)

 It was the "apple" of my eye until Apple released their Macbook air. OMG what piece of hardware. I was drooling all over it. That was the best piece of notebook hardware I had set my eyes on. It was "gorgeous", "drop dead", "Awesome"........ All of a sudden "Light", "Small" and "Air" had a new meaning for me. I just compared the weight of my lappy with the air, it was shocking. I compared the looks, It was like comparing it with Mona lisa and the cave paintings. Evolution took a long time, as we all agree. But the "Air" was a "Revolution". A revolution which all others are trying to digest and cope up. I have still to see notebooks come anywhere near to the air(There have been a few and as Linus torvalds put it, others will catch up. But they will "catch up")

If we observe the Macbook air from its first iteration, nothing much has changed. The basic chasis is still the same. Changes occur when there are competitors and are forcing you to a corner. As of now the air leads the lot and others are catching up.

1. Yes, I know, RAM is soldered ---no upgrade
2. Backpanel is locked by propreitory shaped screws  --not to be opened by ordinary users.
3. No DVD drive --watching movies, opening presentations/documents at office on cd/dvd not possible(I dont know how many still do....).
4. Only two usb ports --Nowadays, I dont know what is the right number of USB ports required.
5. Runs on proprietory software  --A simple bios upgrade can disturb any custom OS on the device.
6. Hard drive capacity limited  --Though on a mid 2011 macbook air, we can still change the hard drives capacity, since it is not soldered.
7. Battery -- can be changed but at an apple store.

Oh, so many negatives. Let us get to the positives.

1. Incredibly thin/light/compact/portable
2. Unibody aluminium chasis  --No creaking
3. Awesome multi-touch touchpad(A very large one)(Clickpad, to be more precise) --The feeling of crossover between a tablet and a notebook with an additional "click" action throught the touchpad
4. Full sized keyboard --Completely relaxed position of the hands while typing, not to be disturbed by the touchpad. The touchpad can be made to respond to only the physical "click", that is, pressing the touchpad down(like clicking a mouse)
5. Lid opened with one hand only --The hinge tightness is just right to open with one hand and perfect enought to hold the display upright.
6. Keyboard backlight -- Intensity of the keyboard light can be changed via shortcut keys on the keyboard. Makes using it in dark environments a breeze(something from the smarphones, especially my sony ericsson mini pro). It is the right place to give sony, credit for the chiclet keyboard.
7. Magsafe charger --I liked the design of the charger, where it gets pulled(magnetic) to its charging point as it is brought near to the charging port(A deft touch, that).
8. Display --The 13.3" screen is just right at 1440 X 900 resolution. It is not the best out there, but ample enough.
9. Except the fan, No moving parts --It is "silent" most of the time. I noticed the fan rev up when flash enabled sites are visited. And the exhaust of the fan is let out at the hinge(I loved this piece of engineering). So your lap is kept as cool as possible.
10. The icing on the cake is an i7 processor clocking at 1.8Ghz with ondie graphics core and 4GB DDR3 RAM.

As a whole, I am just awed by the device hardware. All this comes to a standstill when you will see that it runs Mac osX, which is as propreitory an OS can get over a community developed code. It does make me happy(My happiness is nothing compared to that of the Freebsd community which prides itself whenever its code is being used for propreitory or "freedom" purposes) that it is using contributions from the free software community by using freebsd code and the mach kernel code for the core OS and using other nifty tools like the webkit code from the KDE project. At the same time, the user is completely locked by the propreitory layer of UI and graphics libraries. It is difficult to imagine that the worlds most profit making company is making profits by leveraging community code and returning near to nothing to the source.

So, how do we "Free" this awesome hardware from the clutches of propreitory software?

Run windows on it, ha? Installing windows on a macbook air is a breeze. The drivers are available from apple. Install the OS and install all the drivers. Thats it. Windows runs beautifuly on this device. Hey, wait, now we have locked both the windows and dooors. The ultimate lockin.

No, we are not even considering it. What are the options we are left with? GNU/Linux, GNU/BSD, GNU/MINIX, ANDROID..... I chose GNU/Linux for the obvious.

1. It runs beautifully well on x86 hardware.
2. It is my favorite OS for the past 11 years.
3. I know my way around.
4. Awesome community.
5. Thriving developer base.
6. Strong Ethics
7. Ever increasing user base.

Now, GNU/Linux comes in many flavors. My favorite flavor has been Debian GNU/Linux, the universal operating system. In its goal of becoming a universal operating system Debian cannot cater in particular to a very small group of elite users having the capability of buying mac hardware(I do not mean that they wouldnt do it, But it would not be worth, taking the entire world into consideration). I tried the latest testing build and failed terribly. But, do not go by my experience. There are people who have succesfully installed Debian GNU/Linux on a macbook air. Just search them on the public network.

Come on, then, Let us "free" up this awesome piece of hardware...........................................