The Official *nix Thread

Inane baanter or words of wisdom - you decide...
Post Reply
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Inodes, right? I'm given to understand that files with the same "inode" somehow point to the same file - I've noticed this a lot recently with configuration files, especially network configuration files under /etc/sysconfig - for example /etc/hosts and /etc/sysconfig/networking/profiles/default/hosts appear to be the same file when listed with ls -i. But these are not symbolic links, so I assume they're "hard" links - which I've never had occasion to use.

Seems a little redundant to me - some sort of legacy file path stuff? And I'm not sure what this inode stuff is anyway, but after hunting around a little on google, it seems to be a unique number index for every file. But it also seems as though this is itself redundant as the file name and location itself holds this information and makes every file unique. So what's the skinny? It's also implied that inodes also hold other attributes about a file, but this was never really explained.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
tufty
Sheepie Whore
Sheepie Whore
Posts: 12524
Joined: Fri Jan 07, 2005 4:52 pm 0
Location: French Alps

Re: The Official *nix Thread

Post by tufty »

http://en.wikipedia.org/wiki/Inode sums it up pretty well.

The inode basically tells the OS about the file, including (amongst a bunch of other stuff) where it lives on the storage medium.

A directory entry maps (or links) a filename to a particular inode. it's a one-way mapping, you can't generally go back from an inode to a filename (c.f. hardlinks). indeed, knowing this, it's easier to understand why deleting a file is done through a call to unlink().

For the best example of what hardlinks can do, look at Apple's "Time Machine". Each "snapshot" contains what files have changed since the last one, and the rest of the files are hardlinks to the unchanged version. So you can happily unlink stuff from a given snapshot, and other references to those files will continue to work - the file (and its corresponding inode) will only actually go away when the link to the inode is unlinked.

As inode numbers are usually only guaranteed to be unique across a single filesystem, you can't usually hardlink across filesystems.

A symlink works differently - it's a file of its own, with its own inode, that points to another (usually) filename. Unlink the pointed-to file (even if it's a hardlink itself and the underlying file still exists) and the symlink gets busted.
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Thanks - I keep forgetting Wikipedia has useful information :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

I'm trying to set up IP masquerading under iptables. Essentially, I want to forward any traffic to port 7070 on a static IP address machine to a DHCP assigned address (192.168.1.*) machine behind it to port 80 since we've got no public IP addresses spare. After reading up on iptables, I figured this should work as a config (/etc/sysconfig/iptables) on the static IP machine: -

Code: Select all

-A PREROUTING -p tcp -i eth0 --dport 7070 -j DNAT --to 192.168.1.8:80
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p tcp -i eth0 -o eth0 -d 192.168.1.8 --dport 80 -m state --state NEW -j ACCEPT
...but when restarting the iptables service, it complains about the first line (but fails to explain why). What am I doing wrong?

I've enabled ip_forward = 1 module.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Managed it :)

In case anyone else wants to do something similar...

iptables-config:

Code: Select all

IPTABLES_MODULES="iptable_nat"
iptables:

Code: Select all

*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
-A PREROUTING -i eth0 -p tcp --dport 7070 -j DNAT --to-destination 192.168.1.8:80
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -m state --state NEW -m tcp -p tcp -d 192.168.1.8 --dport 80 -j ACCEPT
COMMIT
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
guythp
Baaaaaaa!
Baaaaaaa!
Posts: 5659
Joined: Thu Apr 25, 2002 11:49 pm 0
Location: Ipswich, Suffolk

Re: The Official *nix Thread

Post by guythp »

Posting from a newly upgraded lucid lynx and, after a bit of a brouhaha getting the nvidia driver working (a removal and reinstall seems to have done the trick), it all seems generally quite nice (please bear in mind I use my for browsing and (after finding out it's a simple 'copy and paste' with my ipod and NOT having to install itunes to get my music from it) listening to music (windows for games and pron.. Ok, emulation.. and some porn). Boot up speed isn't to bad and the shut down time's very fast.. Anyone else using this yet?

One thing still puzzles me, why have they put the window close button in the top left, next to the minimize button? [/Columbo]
the hairy pies
User avatar
stealthbanana
Baaaaaa!
Baaaaaa!
Posts: 2805
Joined: Wed Nov 09, 2005 11:59 pm 0
Location: Over Here.

Re: The Official *nix Thread

Post by stealthbanana »

I am running it on my laptop and netbook (and a vm on my desktop). Very nice and quite nippy at bootup, I like the new default theme, but as you say the button placement is annoying, doubt it will stay like that, it is still alpha after all.

To change it, press alt-f2 and enter gconf-editor. When it opens select "apps" scroll down to "metacity" then select "general" highlight "button_layout" right click and select edit. Move the : to the start of the line and close.

That should be it.
Not long now before lollipop men are called Darren
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

So Ubuntu 10.04 LTS is out now - I'm pretty sure desktop upgrade from 9.10 will be fine, but has anyone tried doing it from 9.10 -> 10.04 with the Netbook Edition? Any problems?
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
JQW
Baaaaa!
Baaaaa!
Posts: 1186
Joined: Thu Feb 22, 2007 12:23 pm 0
Location: Ripon, where nothing ever happens.

Re: The Official *nix Thread

Post by JQW »

I couldn't even get the netbook edition to install here. I had serious kernel problems after bootup which I presume are due to quirks of the particular hardware platform I was using.
User avatar
disciple
Sheepie Whore
Sheepie Whore
Posts: 13941
Joined: Mon Oct 27, 2003 11:33 pm 0
XBL Gamertag: LiberMentis
PSN: Prime_Heretic
Location: Greenfield
Contact:

Re: The Official *nix Thread

Post by disciple »

RageMatrix wrote:So Ubuntu 10.04 LTS is out now - I'm pretty sure desktop upgrade from 9.10 will be fine, but has anyone tried doing it from 9.10 -> 10.04 with the Netbook Edition? Any problems?
Desktop upgrade borked my work machine.

I think it was something grub related, possibly influenced by my non-standard partioning. After spending a while trying to fix it (grub 2) I got fed up and went down the fresh install route.
PS4 : Prime_Heretic
Steam: bitstorm
Elite Dangerous: Cmdr Britain
User avatar
xav
Baaaaaa!
Baaaaaa!
Posts: 2455
Joined: Thu Jun 06, 2002 5:32 pm 0
Location: Bucks, UK
Contact:

Re: The Official *nix Thread

Post by xav »

RageMatrix wrote:So Ubuntu 10.04 LTS is out now - I'm pretty sure desktop upgrade from 9.10 will be fine, but has anyone tried doing it from 9.10 -> 10.04 with the Netbook Edition? Any problems?
9.10=>10.04 UNR on my Dell Mini 9 seems to have gone fine, with the exception of a problem with the Broadcom wifi driver (searching for the error message brings up a bug report and workaround, but I use a wired connection 99.9% of the time, so haven't tried it yet).
Co-creator of The Greys, Monsters, Inked & Elvie webcomics
• Web Site • Twitter • Patreon •
User avatar
stealthbanana
Baaaaaa!
Baaaaaa!
Posts: 2805
Joined: Wed Nov 09, 2005 11:59 pm 0
Location: Over Here.

Re: The Official *nix Thread

Post by stealthbanana »

Netbook edition on my Aspire one went flawlessly, similar desktop as well, though it is annoying that the splash screen only shows up in low res if you have an ati or nvidia card.
Not long now before lollipop men are called Darren
User avatar
galaxis
Baaaaa!
Baaaaa!
Posts: 1099
Joined: Fri Feb 25, 2005 10:01 pm 0

Re: The Official *nix Thread

Post by galaxis »

9.10 -> 10.04 upgrade ran into quite a few graphics problems on the ThinkPad T60 I use - something seems to be wrong with kernel framebuffer support on the Radeon Mobility... But apart from that everything has worked fine, although it's a hacked up Ubuntu Server installation running XFCE (mostly, but not quite Xubuntu).

Grub -> Grub2 update failed because I use Grub chainloaded from the Windows 7 bootmanager, and I couldn't be bothered to find out how to configure Grub2 for that (wasn't offered by the upgrade routine anyway, seems to be content with staying on the old Grub).
User avatar
defsdoor
Baaaaaa!
Baaaaaa!
Posts: 3909
Joined: Fri Jan 30, 2004 12:26 am 0
Location: Sunny Beduff

Re: The Official *nix Thread

Post by defsdoor »

They've put plymouth into 10.04 and its the cause of so many issues. All rather pointless as all it's there to do is display something fancy that should seamlessly which to the gdm login.

I've upgraded to 10.04 from 9.10 (and 8.something before that) and have issues with plymouth. Sometimes it's fine, sometimes it locks up. Booting with splash removed always works fine.

Always fecks up when fsck needs to run at boot up.
User avatar
koogy
Baaa!
Baaa!
Posts: 475
Joined: Thu Aug 31, 2006 11:16 am 0

Re: The Official *nix Thread

Post by koogy »

will leave it a week or so before upgrading (and only then a new install in a new partition. quintiple boot ftw!)

the current faster boot times sometimes lead to it popping up messages saying it's waiting for the disk to be available (or something, they flash past). is this worse now the boot time's been halved? (from what i hear).

is it using nouveau? had a bastard of a time getting fedora to boot. actually, that's not true, it booted fine, only the display was completely black. (rdblacklist=nouveau fixed that)
Post Reply