忍者ブログ

Mechatronics and Life

There is simply nothing of importance whatsoever.

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。


System Recovery

I had the idea of swapping out one of the Harddisk from my Desktop box simply because it refused to boot under AHCI mode.

Under my plan, my desktop box would change from a combination of 640GB+1TB (where my debian installation sits) HDD to a 2TB+1TB. The 2TB had been sitting inside my portable HDD case for a long time.  The portable case had minimal reliability to speak of because of it's tendency to lose connection after a while. I planned for the action for a lengthy period but never got to execute it as I didn't have the effort and the time required.

Here comes the mid-semester break (I don't think I have said that I am now a 1st year University Student) and that certainly means that I can afford to waste some time. So I opened the case and swapped the HDD. I brought everything back to place and powered the box on. It refused to boot. By then I realised Grub was actually on the 640GB that was replaced. By then I had no bootloader to go with.  I needed to install Grub again on the 1TB HDD so that it boots and I get my OS back.

Without any second thought I went to search for my Debian Installation Disk. It turned out that I lost it and had to burn a new replacement. Easy job there. Here comes the hard part. When I tried to install grub back on to /dev/sda it showed  an error of "This GPT partition label has no BIOS Boot Partition; embedding won’t be possible!". I panicked slightly and decided to google for an answer.

It ended up that I had to make a small partion on /dev/sda (1MB would do finely) and execute "sudo parted /dev/sda set <partition_number> bios_grub on" in a shell of any sort. Easily done and I hit the reboot button. When it finished doing POST, Grub came back on and once again I was a happy man.

Ended doing some cleanups and compiled 3.4.0-rc1 for my Debian box. I also made a 680GB btrfs partition to test the reliablity of this young filesystem.











PR

IPv4 NAT on Ubuntu

Setting up my Ubuntu Router Box does require a bit of port forwarding and NAT work. I am glad that there's only 2 or 3 clients on my network at any moment of time.  Now I just have to get those configuration to come up when the router boots.  So far I have got ipv6 default route ppp0 working wherever ppp0 comes up. (ppp1 is my PPTP VPN which is useless at the moment)

-A PREROUTING -i ppp0 -p udp -m udp --dport 16384:16482 -j DNAT --to-destination 192.168.0.20
-A PREROUTING -i ppp0 -p udp -m udp --dport 5060:5061 -j DNAT --to-destination 192.168.0.20
-A POSTROUTING -o ppp0 -j MASQUERADE
-A POSTROUTING -o ppp1 -j MASQUERADE

I don't think I need "-A POSTROUTING -o ppp1 -j MASQUERADE" on my iptables anymore. I am not using my PPTP VPN anymore. It's not stable compared to OpenVPN which uses TLS/SSL and as such much more stable connection can be made over Windows/Linux.


New Toy

498RC2 and 190XPROB




Very decent stuff

The head without anything


If I put my 7D+70-200 on it, it looks rather cool. 
 

A very dangerous configuration, not sure if I want my 70-200 to stay on it like that .

Overall my new tripod/head is some fun stuffs. I don't really have any time to head out and shoot though :-( 

Building a Ubuntu IPv4/IPv6 Dual Stack Router Box

It has been my interest to build a Dual Stack Router Box that allows me to do more fun stuff than a modem. Now I have the time to get to it.

OS: Ubuntu 11.04
interfaces:
ppp0:The PPP part of it
ppp1:My VPN
eth0: the interface which is connected to the modem
eth1: the interface which is goes to my LAN
  • Doing the IPv6 Part of network
  •   It's actually relatively easy compared to Ipv4. Get pppoeconf setup to handle PPP. 
     
    sudo apt-get install wide-dhcpv6-client
      That will allow me to get a static /60 subnet by Prefix Delegation
     
    sudo apt-get radvd 
      That allows me to advertise my subnet to eth1

    sudo ip -6 route add default dev ppp0

    Then I just have to manually set up DNS in my host which is a slight pain. 

    Things needed to be considered:
      Need to consider how to automate this process every time ppp0 comes up.
    The other issue I need to solve is how to advertise the DNS automatically to my host.



Will do the IPv4 part in the coming days.