Archive for the ‘ubuntu’ tag
Εγκατάσταση Ubuntu Intredip με dnsmasq και PXE
Έχω έναν φορητό υπολογιστή Fujitsu Siemens (AMILO). Τα specs δεν τα γνωρίζω καλά καλά, αλλά υπολογίζω 1.5 Ghz / 512 MB Ram / 40 GB HD. Το CDRom είναι χαλασμένο. Θέλει καρφίτσα, τσιμπιδάκι για να σφηνώσει έτσι ώστε να μην αναπηδά το CD. Το συγκεκριμένο laptop έχει δυνατότητα PXE boot. Συγκεκριμένα το PXE-2 της intel.
Οπότε αποφάσισα να χρησιμοποιήσω το Dnsmasq έτσι ώστε να κάνει boot σε Ubuntu το μηχάνημα μέσω δικτύου. Το πρώτο που πρέπει να κάνω είναι το setup του server.
Κάνω edit το dnsmasq.conf. Η διανομή του server είναι Gentoo GNU/Linux. Οι ρυθμίσεις στην ουσία είναι για Gentoo αλλά με ευκολία μπορούν να λειτουργήσουν σε όλες τις διανομές Linux.
# mkdir /mnt/tftp ; cd /mnt/tftp
# screen lftp -c “open http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/; mirror”
#ln -s /mnt/tftp/pxelinux.cfg/default /mnt/tftp/pxelinux.cfg/000AE42EA642
# cat /etc/dnsmasq.conf
dhcp-boot=pxelinux.0,gentoo-server,192.168.3.45 #boot image, server και ip του server
enable-tftp # Λέμε στο dnsmasq να κάνει start τον tftp demon. Αλλιώς θέλουμε κάτι σαν το tftp-hpa.
tftp-root=/mnt/tftp #Θέτουμε το root directory του TFTP server
Αφού κάνουμε start το dnsmasq, χρησιμοποιούμε το netstat ή το lsof για να δούμε αν οι υπηρεσίες που μας ενδιαφέρουν λειτουργούν κανονικά:
egasus tftp # lsof -i|grep -i dns
# lsof -i|grep -i dns
dnsmasq 23683 nobody 5u IPv4 137982 UDP *:bootps
dnsmasq 23683 nobody 6u IPv4 137987 UDP *:domain
dnsmasq 23683 nobody 7u IPv4 137988 TCP *:domain (LISTEN)
dnsmasq 23683 nobody 8u IPv6 137989 UDP *:domain
dnsmasq 23683 nobody 9u IPv6 137990 TCP *:domain (LISTEN)
dnsmasq 23683 nobody 10u IPv4 137991 UDP *:tftp
ή
# netstat -lu|grep tftp
udp 0 0 *:tftp *:*
Στο παραπάνω παράδειγμα κάνω χρήση της εντολής “ln”. Το αρχείο default κάνει link στην MAC Address του client που θέλουμε να κάνει boot. Πως την βρίσκουμε; Κάνοντας ένα ping στο target και χρησιμοποιώντας την εντολή “arp -a” σαν root!
Προσοχή, στο ln -s, το mac address που βάζουμε ως link είναι χωρίς τα “:”. Κάπως έτσι:
pegasus ~ # ping -c 1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.451 ms— 192.168.0.1 ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.451/0.451/0.451/0.000 ms
pegasus ~ # arp -a
router (192.168.0.1) at 00:1d:7e:b4:78:da [ether] on eth0
pegasus ~ # ln -s /mnt/tftp/pxelinux.cfg/default /mnt/tftp/pxelinux.cfg/001d7eb478da
Έπειτα ανοίγουμε τον υπολογιστή που θέλουμε να εγκαταστήσουμε το σύστημα και κάνουμε boot κι απλά ακολουθούμε τις οδηγίες στην οθόνη!
EDIT: Εάν για κάποιο λόγο κολλάει η εγκατάσταση στο “Release” και δεν σας βγάζει πληροφορίες για τα πακέτα που κατεβάζει, αλλάξτε το mirror! Το Ελληνικό δεν είναι ενημερωμένο συνήθως, καλύτερα δοκιμάστε το Ιταλικό “it.archives.ubuntu.com”.
Going back to linux?
Recently I’m feeling the desperate need for a Desktop computer. Due to “much spending” and other needs, I am seriously thinking to buy an iMac on September. However until then I need a widescreen desktop. I didn’t buy anything near to core duo. The last two computers I got, were 2 Pentium 4 powered machines. The first one is acting as a home firewall/gateway server and the second one will act as a home server for torrents and other needs mostly. On the other hand there’s a Dreambox decoder running here, that could be easily turned into a small Linux server for torrents and other staff. I have to decide the topology these days.
If I get the mac, it will be an iMac 2.8 Ghz Core Duo with a 24” screen and at least 2G of RAM. However, as mentioned above, this scenario seems a little rough right now. So I’m seriously thinking to go back to GNU/Linux. I haven’t used Linux as my main desktop for almost three years. I’m really satisfied with OSX, it suits my needs perfectly. However a desktop computer is badly needed here so… I’m thinking of a core duo machine with at least 1.5 G of Ram and plenty of HD available. The graphics shouldn’t be nothing extravagant, I don’t need them. I do some basic video and photo editing but that’s all.
The first problem in a similar cases is how you transfer you data from one computer to the other. Now, all the mp3’s and photo libs are handled by my laptop on the WD MyBook’s UFS partition. I like the way iPhoto and iTunes handle the library, although iTunes tend to be a bit bloated & slow, it works good enough and it’s in line with my iPod. Linux will give a hard time with the ipod and… Windows is not an option.
Another issue is the distribution of choice. I am among Gentoo and Ubuntu. I have a computer on the basement running WindowsXP & Ubuntu Gutsy. I’m surprised by the ease of use and way that the Ubuntu team put everything together. Apparently everything works as it should. I didn’t had issues with broken programs etc. But as said before, it’s not a day-to-day computer for me so I can’t be sure. On the other hand, I like Gentoo. I love it. It would be a one-way choice for me, but the problem is time. Gentoo takes time to configure and I’m not quite sure I want to spent too much time on configuration. I’m much more interested in quality time, you know? Doing things with a computer not just troubleshooting in order to make it work.
Next week, I’m leaving the army (FINALLY!) for good and I have to make a choice and stick with it…
