Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Sunday, March 01, 2009

Static IP configuration on Fedora 10

Until last week Hathway (my ISP in Mumbai) was asking me to do DHCP discovery for IP address. After the n/w stopped working yesterday I called their service rep. One of them couldn't resolve it yesterday, so he forwarded me to another guy who turned out to be a funny experience - he gave me all the static IP config valus - and when the network still won't work he started blaming it on computer virus and ultimately rust on my network cable (!) Fortunately for me (and also for him) the modem was little sluggish in picking up the change and the network started working.

I had booted my new computer in Vista (yeah I know! argh!) and it worked fine. Surprisingly my Fedora 10 on Macbook and also the Fedora 10 on desktop won't respond to the static IP information. It took me 4 hours to figure out that there was nothing wrong in my knowledge of the network scripts. I got the clue when I found the system doing DHCP discovery even when I had set it to static IP. I figured it was because of the NetworkManager (seen as that taskbar network icon). When I googled, it became clear that configuring Fedora 10 with static IP is a known problem and the culprit is NetworkManager and/or system-config-network utility. This thread (#14) is pretty much helpful, but the working solution (or workaround) is not definite.

Here is what worked for me (at least for this box).

# Stop NetworkManager
sudo service NetworkManager stop

# Disable NetworkManager service
sudo chkconfig NetworkManager off

# Enable netwok service
sudo chkconfig network on

# Run system-config-network
# Edit the ethernet device under Device tab
# Under "Manual IP Address settings" put static IP Address.
# Leave Subnet mask and Default Gateway blank
# Change to Route tab
# Add route Dest 0.0.0.0 Netmask 0.0.0.0 Gateway
# Add route Dest Netmask Gateway
# Change to DNS tab to put addresses of DNS servers
# Check "Activate device when computer starts" same as ONBOOT=yes (I guess)
# Save the settings

sudo service network restart

At this point network should be working. If it doesn't don't get surprised. The same steps don't help me setup my Macbook Fedora 10 with static IP. Maybe I have screwed it beyond repair. I will wait for the router to arrive, to get my macbook online.



Ads:
* Linux Administration Handbook (2nd Edition) (Best tips on Linux administration I found in this book. Own it myself.)
* Fedora Bible 2010 Edition: Featuring Fedora Linux 12
* Linux Networking Cookbook

Tuesday, December 02, 2008

Fedora 10 on MacBook 2,1

I finally got Linux working on my Macbook. Although, I had bought this Macbook in Dec'06, after confirming that Linux can be installed on it; I never felt any need to do so. My desktop was sufficient for the task. But soon I will be getting rid of my desktop, so have to prepare the Macbook as a primary coding machine.

It is pretty easy, to install Linux alongside Mac OS X, provided you are ready to completely format the hard drive. I attempted to salvage my original installation of Mac OS X, by resizing the HFS volume with parted; however that didn't work. I had taken backup of all the necessary data (hopefully!!).

Here is the recipe for converting a 2nd generation MacBook with Intel Core 2 duo, into a dual boot box. Since Bootcamp has expired on Mac OS X Tiger, I couldn't use it; so this one uses rEFIt and OS X's Disk Utility for repartitioning.

1. Download rEFIt and install it.
2. Reboot and see that you can boot into Mac OS X
3. Reboot with Mac OS X install CD. During installation, use the "Disk Utility" to partition your entire hard drive into three volumes. My layout - 30GB Journaled HFS for Mac OS X, 40 GB for linux (type doesn't matter, we will change it later anyway), and 4GB for linux swap.
4. Continue with Mac OS X installation (this takes looooong time)
5. Reboot into newly installed Mac OS X
6. Reboot with Fedora 10 (or other distro's) installer Live CD.
7. Install Fedora 10 as you normally would - I chose the disks with root partition on 40GB volume (mark it to format to ext3) and 4GB swap. Also note that, you should install the bootloader on first sector of the partition (In my case it was /dev/sda3) and NOT the MBR.
8. After installation is complete, reboot.
9. In rEFIt menu you should see the Penguine alongside Mac OS X.

There are several tutorials that tell additional steps; but above steps worked for me.

I was happy to find many things working out of the box: Wifi, sound, Battery meter in tray. (Note that 2nd gen Macbook doesn't have nVidia card, so don't go installing kmod-nvidia packages like mentioned at many places for newer Macs)

There are several things that still need some investigation - right click, scroll gestures on touch pad. I have yet to test suspend and resume.

But overall the system looks good (writing from the same). I am excited to try out KVM virtual machines for the first time - because this is only the first personal machine I have got with hardware support for virtualization.

Monday, April 28, 2008

Ubuntu reviewed

My home desktop is giving problems, probably because of some heat issues. So I cannot continue what I was working on over weekend. That gives me time to write about my review of new release of Ubuntu that I installed on my office machine.

Over a year I have been contemplating a shift from Fedora to Ubuntu. At the time of Feisty I took a step in that direction, but then I decided to stick with familiar Fedora little longer. Now I am more comfortable with apt and dpkg, thanks to Maemo. So I was eagerly waiting for Hardy release of Ubuntu.

As you can read everywhere else, Ubuntu 8.04 is impressive. I agree. I will rather write about two specific issues that were relevant to my environment.

For few years I have been managing the storage of my desktops using LVM. It's very handy for me. Unfortunately Ubuntu's Live CD installation method doesn't support logical volumes - something that Redhat/Fedora supported so easily. Probably, ubuntu's target audience would prefer minimum click installs to advanced tweaking of the system. The alternate CD discovers logical volumes, but it's very tricky. I don't remember exactly, but last time I tried it, the installer froze on me until I figured - by jumping to adjascent terminals - that scanning of each volume was taking too long. But this time, I found an easier way of using LVM while still using Live CD. As per the instructions, I installed lvm2 and inserted dm-mod into the Live CD kernel. But the article guides you on how to create logical volumes from raw discs and then install Ubuntu on them. In my case I already had volumes. The instructions given in above link are not sufficient if you want to reuse the volumes that you created with your old linux installation. However it is very simple, if you do it right.
  • Make sure you use "sudo" while doing pvscan, vgscan, lvscan. If you don't, these commands will exit silently, giving you the impression that they haven't detected your LVM setup.
  • If you create new volumes as mentioned in above instructions, you will be able to see them as device nodes under /dev/mapper or /dev//, you can use them as targets of your favorite mkfs. utilities. However your already existing volumes won't show up that easily. If you want to see them, use "vgchange -ay". This will activate all your volume groups.
Apart from this, rest of the installation is a stroll in the park.

Now a days, it's common to have dual monitor setups in workplaces. I have one too (I mean two :). I needed to use some nvidia specific utils to get dual monitors working. If you search for terms like "dual monitors ubuntu nvidia twinview" you will get lots of posts. I found and followed all those too. But all of them told me to do Ctrl+Alt+BackSpace to reload X, to test the changes in my x.org file. That just made the display more and more horrible for me. The resolution dropped to 800x640, nvidia's twinview utility was no where in sight. ... until I rebooted the box. Maybe it was little dumb of me to not have rebooted after I installed nvidia's driver. I don't know which of the changes found in all those posts worked for me, but I think the important thing is to reboot the machine after you install nvidia's drivers.

Monday didn't seem so boring because a brand new system was waiting for me at work today. I set things up to suite my needs - nis, automounter, users, firefox sync, mail setup .... Firefox 3 beta 5 is pleasant. Fast as advertised. But I still couldn't find compatible google extenstions that I am so used to (browser sync, notebook, toolbar). There are compatible versions available for Firefox 3, but for some reason they didn't want to get installed on my beta 5 build.

But a major change I did was with my mail client, which wasn't planned. I don't remember if I had used Evolution any time in the past - not seriously for sure. But today I decided to give it a try, as it's the default mail client that comes with ubuntu. And within few minutes, I was a convert. I have stopped using Thunderbird. The biggest turnoff with thunderbird is its lack of calendar utility. Lightning is far behind alpha quality. That had forced me into using Korganizer on my Fedora 7 desktop. But this time I decided to give a shot to Gnome's PIM tools integrated into Evolution. Evolution has almost all the good things that thunderbird has (most importantly fast search), but in addition it has a functioning calendar program. I haven't tried to sync it with MS Exchange, but I doubt if any non M$ client will reliably work with MS Exchange calendars. I am happy with setting up my events and reminders manually, as long as basic functionality is there. Furthermore it was easy to import my mail folders from Thunderbird to Evolution, thankfully both use a standard "mbox" format to store the mails. Filter rules aren't compatible however, I will have to manually write them.

Fedora 9 is coming out in May. If you try it, let me know. I will skip Fedora this time though.