date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,320,253,328,000
How can I add line numbers to man pages or info pages in Linux? I want to use line numbers to navigate in man pages. I can write the man page in a file and then open it with Vim, but is there a better way?
Open a manpage, Hit -N then Enter. ( -, then ShiftN, then Enter) e,g: man man: 1 MAN(1) Manual pager utils MA 2 3 NAME 4 man - an interface to the system reference manuals 5 6 SYNOPSIS 7 man [man o...
How do I add line numbers to the man page?
1,320,253,328,000
Does info (GNU texinfo 4.13) have a default search path for finding a dir file? Is it /usr/share/info? Even though I don't have an INFOPATH variable set in my environment, it seems to use the dir file in the path above. Relatedly, I have a script that sets up a directory with an alternate info directory structure....
Yes, info does have a default value for INFOPATH compiled-in that it uses if you don't have INFOPATH set in your environment. (Also, if your INFOPATH ends with a colon, then the default path is appended to your value.) The default DEFAULT_INFOPATH is .:/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/...
GNU texinfo directory search method?
1,320,253,328,000
I've installed some program that added menu items in info directory node (a main menu of info command). Then i manually deleted the programs info files from the system, so now when i click on 'program' item, it is not found. However the items of the program are still in the directory node. How does info compile the di...
I never ran it manually before, but install-info looks like what you want (if you guessed it has an info manual, you're right, info install-info — although there is a man page, too).
How to update menu of info directory node?
1,320,253,328,000
How can I add man page entries for my own power tools? got me thinking: How would one create an Info page?
To create Info documentation, you first need a texi file. .texi - Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form (creating filetypes as dvi, html, pdf, etc., and its own hypertext format, info) with a single source file. It is implemented by a computer program releas...
How to create Info documentation?
1,320,253,328,000
I was looking for a way to follow "hyperlinks" in man pages, when I stumbled across the info command, which seemed to display information on commands the same as man but also allows you to tab to hyperlinks (and sadly no vim keybindings, but the arrow keys work) But it made me wonder if this command was just displayin...
man and info use different primary sources of information: man displays manpages, typically stored in /usr/share/man, while info displays Info documents, typically stored in /usr/share/info. Additionally, Info documents are normally available in a tree structure, rooted in /usr/share/info/dir, the “Directory node” dis...
Does the info command display man pages?
1,320,253,328,000
When I run the info command I get bash: info: command not found How can I solve this?
You should install the info package: sudo apt install info
Install "info" in Debian
1,320,253,328,000
While redirecting info bash > file.info on Ubuntu, I get a file.info file with just the error: info: No menu item 'bash' in node '(dir)Top' I tried to look at the location of the info page by using info bash -w which shows *manpages* I also could not find bash info page under /usr/share/info but I did find it under ...
On Debian and derivatives like Ubuntu, the bash manual is not installed by default, or only in the man format (and info falls back to displaying the man page when the info manual is not available) which is hardly usable for a manual of this size. You need to install the bash-doc package first. apt install bash-doc (a...
Redirecting output of info command
1,320,253,328,000
I'm currently looking through the "info" page for "ls" command and I want to find all relevant sections that contain the keyword "-l". But I'm not sure how to search for keywords and how to move between different instance of same keyword.
When inside an info page e.g "info python" press the / key and it will give you prompt at the very bottom asking for "Regex pattern" . Press enter and it will take you to the match. Unlike less though, you cycle through matches with Controlx n / Controlx N or with { and } (see Searching Commands – Stand-alone GNU Inf...
How to search "info" page for keyword
1,320,253,328,000
I've noticed that some software come with multiple info files. For example, tar on Fedora 21 comes with: tar.info.gz tar.info-1.gz tar.info-2.gz Are the tar-info-* files dependencies of some sort for the main tar.info.gz file? Is this division unique to each distro? It seems that on the official GNU tar manual page,...
As noted, this was originally done to reduce size. It is documented in 23.1.5 Tag Files and Split Files (GNU Texinfo 6.0): If a Texinfo file has more than 30,000 bytes, texinfo-format-buffer automatically creates a tag table for its Info file; makeinfo always creates a tag table. With a tag table, Info can jump to n...
What is the purpose of numbered Info files?
1,320,253,328,000
I use MSYS2 on my Windows machine and when I installed make, as a dependency pacman installed guile. Listing the files of the guile package revealed that it has info pages (guile.info.gz) installed at /usr/share/info. When I enter info guile, info displays the guile node. However, if I navigate to the top node, I don'...
Debian ships a script called update-info-dir which does exactly this. I suspect that Debian made its own because there wasn't a standard one at the time. You can grab the script from the install-info binary package or from the Debian patch part of the source archive (if this link dies because the version number has ch...
How to automatically update the top info directory
1,320,253,328,000
Is there an easy way to find out which command has the longest manual pages?
You can calculate it yourself for your system with simple command $ find /usr/share/man/ -type f -exec ls -S {} + 2>/dev/null | head | while \ read -r file; do printf "%-40s" "$file"; \ man "$file" 2>/dev/null | wc -lwm; done | sort -nrk 4 which returns on my box (file) (lines) (...
How do I tell which command has the longest manual on my system?
1,320,253,328,000
I am using info command, and when I press m, the keyboard prompt goes into a menu item: mode and I don't know how to quit from this mode. I tried q and ESC, but it didn't work. Finally, I used Ctrl+C to quit. Is there any decent way to quit the menu item: prompt mode in the "info" command?
A quick test with info here tells me that pressing Enter one time works.
How to quit Menu Item mode in the info command page
1,320,253,328,000
man tree1 states: -info Prints file comments found in .info files. See .INFO FILES below for more information on the format of .info files. and further .INFO FILES .info files are similiar to .gitignore files, if a .info file is found while scanning a directory it is read and added to a stack of .info information....
Example: $ cat .info a.jpg blah blah blih blih *.jpg jpeg picture $ tree --info . ├── a.jpg │   ⎧ blah blah │   ⎩ blih blih ├── a.png ├── b.jpg │   { jpeg picture ├── b.png └── foo.user 0 directories, 5 files (with a TAB preceding the comments per the manual you quoted).
Creating .info files to be used with tree
1,320,253,328,000
I want to find the location of info file of the jcal program. It has appropriate info when I call info jcal. The output of info -w jcal is: *manpages* Did I do wrong way to get the full location of info file? What is the best way to get the info file location? Dist: Slackware Current. jcal: 0.4.1 info: 4.13
The command info looks for files at places defined in $INFOPATH variable (usually /usr/share/info/, etc), but if it doesn't find the appropriate file there, as a fallback it switches to the man pages for help (see $MANPATH variable) and prints exactly the same content as man. So if info -w shows *manpages* then try ma...
Where does info file exist
1,320,253,328,000
info make opened same as man make. I've downloaded make.info.tar.gz file from https://www.gnu.org/software/make/manual/, then: sudo cp ~/Downloads/make.info.tar.gz /usr/share/info/ sudo install-info /usr/share/info/make.info.tar.gz /usr/share/info/dir I got info (no pun intended) from https://www.gnu.org/software/te...
The file you downloaded is an archive, you need to extract its contents: sudo tar -C /usr/share/info -xof make.info.tar.gz && sudo install-info /usr/share/info/make.info /usr/share/info/dir Renaming it as you did happens to work because there’s a single file in the archive, and the tar header ends up mostly ignored...
Cannot find node ' '. How to add downloaded Info document file so that info command worked?
1,320,253,328,000
info foo Next, I am in a foo page with links navigated by enter and arrow keys. Are there vim keymap settings for this?
There are, info has this option: --vi-keys use vi-like and less-like key bindings. so your command for foo is info --vi-keys foo
info: are there vim controls for the info pages?
1,320,253,328,000
Is it possible to make lines in the info command wider? An example : When running info awk I get the following output, although the terminal size is much wider. 2 Running 'awk' and 'gawk' ************************** This major node covers how to run 'awk', both POSIX-standard and 'gawk'-specific command-line options,...
Unlike man pages, info pages have the line width set when they are created using makeinfo(1) or texi2any(1) (the --fill-column option). The default is 72 characters, which is why you'll usually see line breaks there. As far as I can tell, to reflow an info page you would have to regenerate the file from its original t...
How to change line width in "info" command
1,320,253,328,000
I know when you are in a man page it will display the file name at the bottom inside the man. How can I do the same thing manually?
I'm not sure it is possible to do everything you ask, because man(1) sends the formatted man page data to your pager program via a pipe. This would prevent showing a file name, for one thing. You can get a line count at least like so: Set your MANPAGER or PAGER environment variable to less. Add -M to your LESS enviro...
How can I display file info of a man?
1,320,253,328,000
On GNU/Linux is it possible to change the default pager for info command? I would like to use less as the pager (similar to man pages). I have customized less to use colors to make navigation of man pages much easier.
info doesn’t use a separate pager, because it handles navigation — it doesn’t produce a text document to be viewed with another tool. It doesn’t support paging to less. You might find Pinfo interesting, it’s a replacement for info (and man) with configurable colours etc.
How to change the pager for info command
1,320,253,328,000
I would like to learn how to use the info pages - i.e. the documentation for GNU programs. If I run info from a terminal, the info program launches File: dir, Node: Top, This is the top of the INFO tree. This is the Info main menu (aka directory node). A few useful Info commands: 'q' quits; '?' lists a...
You can try starting from the command line with info info. Also, my info accepts H to enter the tutorial.
How can I launch the tutorial for the GNU info pages?
1,320,253,328,000
The key bound to (history-node) lets GNU info jump to the last node visited in this window (like a browser's back button). Is there an opposite for this function in GNU info: a way to go forward again in the history if you have gone back (like a browser's forward button)?
history-node pops the most recently selected node, which means the history no longer contains that node; there is therefore no way to go “forward”. There is another way of navigating the history though: list-visited-nodes (Ctrlx Ctrlb) lists all the nodes in the current window’s history, and that can be used to naviga...
Moving forward in history in GNU info
1,320,253,328,000
I'm using the Fish shell on openSUSE Tumbleweed (20200414). I am able to initially search for a string within an info page by typing '/string'. However, when I try to search for the next occurrence using 'n', I receive the following error at the bottom: No 'Next' pointer for this node In addition, searching backwards...
You're confusing info with less and other pagers. info doesn't use an external pager and does not implement the same set of keybindings as less and other pagers do. To jump to the next occurrence of the string press Control-x n or use other keybindings as described in info manual. Also, p and n are used for a complete...
Getting error when searching within an info page
1,320,253,328,000
If I view man pages using info (e.g. info man), I see common hyperlinks (e.g. apropos(1)). However, Texinfo commands that create hyperlinks (e.g. @xref), in Info output, add a label (*Note) before the name of an hyperlink. Concretely, @xref{Node name}. produces *Note Node name::. but I would like to get Node name. (w...
There are two primary Info readers: info, a stand-alone program designed just to read Info files (see What is Info?) and the info package in GNU Emacs, a general-purpose editor. The stand-alone Info reader (greater or equal to version 6.0) may be configured to hide some information (related to note and menu item...
Can I get common hyperlinks in Info manuals?
1,289,568,683,000
When installing something from source (say, Ruby 1.9.2), what command can I run to get a complete list of all the dependencies needed to install that application? Is this possible?
Short answer: not possible. The difficulty of getting the exact dependencies from a source distribution is the reason why package management is so popular on Linux (okay, one of several reasons). In fact, if you just need to get it done and don't care so much how, the most reliable way to get the dependencies will pro...
Get list of required libraries when installing something from source
1,289,568,683,000
I need to compile gcc45 on my computer and that's a lengthy and resource-intensive process for my computer, so I'd prefer to have it do it while I sleep (at night). What's the closest thing to: $ @2300 sudo port install gcc45
The traditional unix command at is usually used for this purpose. e.g. echo 'sudo port install gcc45' | at midnight
How do I execute a script later?
1,289,568,683,000
If I install OpenBSD from CD-ROM: http://www.openbsd.org/ftp.html with install48.iso then is it patched? All 10 patches from here are in the ISO file? If those are not included, how can I apply these patches? Is there a one-liner command (like under Fedora: yum upgrade or Debian based, apt-get upgrade) or do I have t...
The canonical reference for this is The OpenBSD FAQ - 5.1 The install4.8.iso in the 4.8 directory is the 4.8 before patches. So, if you want the patches, you need to install 4.8 then patch your system yourself. The install48.iso in the snapshots directory is more than just the patches to the OS listed on the errata ...
OpenBSD patch system
1,289,568,683,000
Is there a GUI for adding additional software sources in Fedora (FC 13). I have a software repository that works fine when added manually (as a .repo file in /etc/yum.repos.d/), but I'd like to have a better way of telling end users how to install.
PackageKit, the default package management tool in Fedora 13, does not include a method and it's unlikely that they ever will as it's a deliberate design choice to not include repository management. However, could you instead package up the repo file into an RPM and distribute that? By default RPMs will open with Pack...
GUI for adding Fedora software source
1,289,568,683,000
I'm trying to install some software from the command line. There is a file called "config.sub". Am I supposed to use this for something? I haven't been able yet to find out by searching online what this file is supposed to do. I think part of the deal is I don't know how to ask the question correctly.
config.sub is one of files generated by autoconf. Autoconf documentations states that it converts system aliases into full canonical names. In short - you don't have to worry about it unless you're autoconf developer.
What is the function/point of "config.sub"
1,289,568,683,000
I have Windows XP and Linux Suse 11 installed on my laptop for some time. I want to replace my Suse installation with Ubuntu and would like to know if it is possible to do that without affecting the Windows installation. I have the Grub boot-loader that came with Suse. What are the steps to follow (I didn't do the ini...
It's easy and low-risk. Just do the installation normally, and when the time comes to partition the disk, choose a manual partitioning strategy and make sure you override the Suse partition(s) only. Ubuntu will want to override Suse's bootloader with its own. Let it: Grub needs some files in /boot, which you're going ...
Install Ubuntu over Suse without affecting Windows
1,289,568,683,000
I just want to install the operating system and SSH printserver . I just burned the first DVD of the 8 avaible for the amd64 architecture. How many DVDs should i burn in order the operating system to install ? Note: Connection is slow as hell that is why i choose DVD solution
Only the first is enough. It will even have at least one complete Desktop environment, GNOME. The way the content is organised is such that the most popular packages (according to popcon) are in the earlier discs.
Debian 6 installation DVD required
1,289,568,683,000
Is there any existing step by step guide instructing how to install 2 different Linux OSs (say, Red Hat and SUSE), and Windows OS on the same machine? (When tried it I entangled with the partitions configuration, and I've heard from others that the secondary Linux has to be installed without its boot loader).
In my experience always install Windows as first OS. Otherwise it will overwrite the boot loader of the previously installed OS. There are ways around it, but these just make it more complicated. After installing Windows, install your first Linux distribution. It normally will find your Windows installation and add it...
Step-by-step guide for installation of 2 different Linux OSs and Window OS - on the same computer
1,289,568,683,000
I have installed Ubuntu Server 10.10 and now I want to install some software like PostgreSQL, Nginx and PHP. But what is the preferred way to get the latest stable version of the software? E.g I tried with sudo apt-get install postgresql but that installed version 8.4 of PostgreSQL but 9.0.1 is the latest version. I h...
Either you are patient and stick with what you have, or you find an official backport, or you find some unofficial backports, or you build your own package. The details depend on the particular package. For example, in the case of PostgreSQL, you can either wait a few more weeks until the package officially enters so...
What is the preferred way to install new versions of software?
1,289,568,683,000
I am installing Fedora 14 and I am wondering if the Fedora packages are cryptographically signed package signatures are checked by the installer by default package signatures are checked by yum when installing additional packages or doing upgrades
The packages are cryptographically signed, and the yum package installer does check those signatures when you add packages after the fact. The initial installer, however, does not check package signatures. This is a difficult problem, because: how to you verify that the cryptographic signatures you have on your instal...
Are packages cryptographically signed in Fedora 14?
1,289,568,683,000
While trying to install Amahi and Fedora 14 from 5 discs, I get this error: It says: A fatal error occurred when installing the module-init-tools package. This could indicate errors when reading installation media. Installation cannot continue. When prompted, I opted to install the Fedora repository, the Fedora U...
Have you tried installing without using any on-line repositories, just the CDs? Maybe its failing to download a package for some reason. Install from just the local media, then use yum to update afterwards.
Why is my Fedora 14 install failing?
1,289,568,683,000
My question is almost a duplicate of this question, but not quite because that one is about ext3 and I am already using LVM. I have an older HP Pavilion laptop running Fedora 11. I chose Fedora because it was semi-compatible with the hardware and it ran VMware well... but since I no longer need VMware I am looking to ...
I don't know if that functionality is offered by typical installers, but it is easy enough to do from a live CD (or live USB or whatever). Both SystemRescueCD and GParted Live have the required tools readily available (there are undoubtedly many other suitable live distributions). Note that you need to boot from a sep...
Can I alter my Fedora LVM LV to install a new distro as a dual-boot?
1,289,568,683,000
I am using Fedora 13, and it was my friend who did the installation for me. I have used Ubuntu also and I found it more easy to install than fedora. Ubuntu uses a WUBI installer (if I am correct) and its more easy for the users to install and remove Ubuntu. For a person who knows how to install and remove an applicati...
Most of the significant (including Fedora and Ubuntu) distributions prefer to install from a boot cd-rom or usb-stick these days. Windows need not part of the process at all. Wubi is a windows application that can run Linux from a Windows file pretending to be a boot disk. Its purpose is to be have zero-impact on the ...
Fedora vs. Ubuntu installation
1,289,568,683,000
I tried out the linuX-gamers live DVD and like it so much that I want to have it as the main operating system on my desktop. The FAQ says: Can I install or copy the medium to my hard disk? No, the software is only designed to boot from a live medium. However, as the live DVD is said to be based on Arch Linux I th...
As of today I have successfully installed this distribution and can use it as if it were Arch :) Below is the simplest way to do so: Install Arch on the hard drive Remove everything in / (in the local disk), except for /boot Mount the root-image.sqfs image in the linuX-gamers live DVD and copy everything inside to / ...
How to install from a Linux live CD that does not support installing?
1,289,568,683,000
I'll probably be in here a bit over the next few months. The only exposure I've had to Linux is just some basic dabbling with Ubuntu and using Knoppix as a recovery DVD for when things go wrong. I need to setup a VM with CentOS 5.5 64bit. I downloaded the iso from the main site. Have mounted it with VMWare workstation...
There are three kinds of ISOs: First the DVD-ISO which is the best suited for you, I think. Then there is a set of CD images which only make sense to download if you need physical disks but don't have a DVD burner and thirdly the netinstall ISO which you seem to have downloaded. To find a mirror which has the DVD iso...
Am I installing CentOS 5.5 right?
1,289,568,683,000
Backstory: Recently, it was explained to me that to upgrade any package via terminal on a linux machine, I will need to use the distributions package management system to install or upgrade the package. Since I use CentOS, which is a RHEL variant, the rpm command will need to be executed in terminal to accomplish this...
Since I use CentOS, which is a RHEL variant, the rpm command will need to be executed in terminal to accomplish this (I believe so) While RPM is used to work with the actual packages, RHEL and friends now use yum to make it less tedious. Yum lets you install software through repositories, local or remote collections...
How should I search for packages to install on CentOS 5.5?
1,289,568,683,000
On Ubuntu Desktop 10.04.1, I have just run apt-get install to install a package. Amongst the list of suggested packages is ssh. I'm confused, because I am sure that I already have ssh installed: # ssh --version usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port...
You have the ssh program. You don't have the package called ssh. Ubuntu splits ssh into two packages: openssh-server and openssh-client. The reason for the split is that many people just need the client, not the server. Having the server installed and running when you don't want it isn't just (tiny) a waste of resourc...
Why does 'apt-get install' suggest packages that I already have?
1,289,568,683,000
Can someone suggest a RHEL-like distribution that can install from a single CD? I am looking for a distribution where services are started from /etc/init.d, environment variables are set from scripts in /etc/profile.d and so-on (meaning that Ubuntu doesn't do the job). A network installer isn't an option... I think in...
Why don't you think of Fedora? Perhaps you think it cannot be installed with a single CD? It has always been an option, to install Fedora from the first ISO in the series. That was quite misleading but if you read the description carefully enough there is text that says something like "Only first CD is required, the r...
Single CD install of a RHEL-like distribution?
1,289,568,683,000
I installed Python 2.7 from source. A dependency of some packages is python. Is there a way I can prevent the install of a lesser version of Python, or let apt know it's already been fulfilled?
You should always avoid building Python yourself, unless you have a very good reason to. You don't want to mess with the Python environment provided by your distro. If you are just tinkering, always do it in a restricted environemnt, e.g. a VM or virtualenv. Also, why are you installing from source? Python 2.7 ought t...
Prevent a package from being installed?
1,289,568,683,000
This page describes how you can use the debootstrap utility to install a base Debian unstable/sid system on an existing Linux machine. The new install is accessible using chroot. When doing this, what security issues should be kept in mind? For example, what needs to be done to stop background/startup processes from s...
Chroot alone doesn't bring any kind of security. In other words, treat a chroot as if the chrooted processes could access everything on the system — because often they do. See also chroot "jail" - what is it and how do I use it? — note in particular Michael Mrozek's remark "chroot jail" is a misnomer that should real...
Debian unstable chroot security issues
1,289,568,683,000
I have a VPS with Debian GNU/Linux on it. I'm trying to install a PHP file manager so that people could access it and download stuff into a directory. I don't have anything in my /bin about PHP so this is probably an issue. I installed PHP with this command: apt-get install php5 php5-cgi php5-cli php5-gd php5-mysql li...
Moving that comment to its own answer, looks like your /etc/apt/sources.list is faulty. Edit it to remove the line that contains debian-security, and replace it with deb http://ftp.nl.debian.org/debian/ lenny main contrib non-free for the main distribution, deb http://security.debian.org/ lenny/updates main contrib n...
Fixing debian installer
1,289,568,683,000
I am developing an embedded Linux system. The system is usually installed by creating a ISO file which is written to a USB stick the board can boot from. To make the installation possible to do automatically (say, over night) I would like to be able to do the installation on the board while the old system is running. ...
I can think of different ways to do what you want. All of which carry a level of risk and difficulty. The main risk being that if the install goes wrong/breaks you will end up with an unbootable system that needs installing manually. My main thought (which depends on your boot loader and similar) would be to use exact...
Swap root at runtime
1,289,568,683,000
I wonder if I have previously installed ubuntu with root, home, and swap partition. And now I want to change distro to arch linux. Is it so that I only need to wipe my root-partition and install arch linux there instead?
You can safely leave the swap partition as is, it can be shared among different distros. The root partition definitely has to be wiped, as you expect. The home partition is somewhere in the middle. Of course your data and settings will not harm the new installation, but a difference in configuration options may give y...
When changing distro
1,289,568,683,000
I installed Fedora 14 using a slightly non-standard method, i.e. loading the install media vmlinuz/initrd.img files via an existing grub2 instance. (I fetched them from a mirror). The installer works fine, but I was a little bit surprised that after selecting the network install route I had to manually enter the URL o...
Simple answer is no, and this goes back to at least 2005, if you are doing this en-mass with grub, then you should still be able to specify in the boot options the paths to mirror, just like you can with specifying a path to a Kickstart file. Some brilliant examples of how to do this can be found on the Fedora Infrast...
Does the Fedora installer not include default URLs for installation mirrors?
1,289,568,683,000
I'm building a new rig and got the RealSSD C300 for its supposedly stellar performance, but it is not recognized when I try to install Ubuntu 10.4LTS 64-bit. Is there anything that I can do to get this recognized?
The question lies in the SATA3 controller. This forum thread answers the question. http://ubuntuforums.org/showthread.php?t=1456238 In summary, in the BIOS change the SATA3 controller mode to AHCI, this should allow linux to find and use the drive.
Installing Ubuntu, how do I get it to recognize the Crucial RealSSD C300?
1,289,568,683,000
I've tried to install emacs on Ubuntu server 64bit 11.04, but it's complaining about emacs23-common. If I do: sudo apt-get -f install I still see the same problem: Errors were encountered while processing: /var/cache/apt/archives/emacs23-common_23.2+1-7ubuntu2_all.deb E: Sub-process /usr/bin/dpkg returned an error...
try a sudo apt-get clean your local repository may be out of date
apt-get has unmet dependencies, but apt-get -f install doesn't solve problem
1,289,568,683,000
Is it possible to create a single-user USB installation (with persistence) of Ubuntu Linux such that the entire USB stick is encrypted and requires a passphrase at boot time? Is there an online tutorial for this?
It should be straightforward to make a persistent installation directly on a USB stick, as if it was an internal disk. Plug in your Ubuntu installation media (I recommend not putting it on the same stick, so that the two are bootable separately), your USB stick, and point the installer to the stick. The server install...
USB Ubuntu with whole-disk encryption
1,289,568,683,000
I need to install another kernel (2.6.34) into my fedora machine (x86) and i need to show the old and new boot up options in the boot menu (both new and old kernel) I have downloaded the new kernel and i need to compile it and need to build it. can you explain me the steps for doing that? I got the correct steps from...
If you just need any 2.6.34-kernel, you might head over to koji and try to find a precompiled one for you version of fedora. You can install it as root after downloading all required rpms with yum localinstall kernel-*.rpm and it will automatically appear in Grub. If you need to modify the kernel, it is best to also s...
Installing new kernel (by commandline) as side of old kernel and effective configuration of ' menuconfig'
1,289,568,683,000
I am feeling stupid. I have been searching for 3 hours with no success. I installed Fedora 14 and tried to do yum install firestarter but the package was not found. I also tried from a GUI and found nothing. It is at fedoras repository? Maybe I should configure the repository, but all I found are dated. Any help? T...
Firestarter hasn't been in the fedora repository since Fedora 11. It's listed as a deprecated package on their wiki. It's recommended that you use system-config-firewall instead. Do you have a particular reason for wanting to use firestarter? If you really want to install it you can try grabbing the source from sou...
I can't figure out how to install Firestarter Fedora
1,289,568,683,000
Is it possible to reinstall Fedora (I have the DVD that I used to install it yesterday), and keep the files in my home directory? I seem to have messed up my system while trying to get my monitor resolution to work correctly: Installed Fedora in dual boot Windows desktop. Now I can't get full monitor resolution with m...
Yeah sorry about that. :) It is possible, but is only easy if you made /home be a separate partition. Despite my best efforts, this isn't the default. You don't have a lot of files yet, though, do you? I think the best bet is to boot into single user mode and copy the contents to a USB memory stick. That should be eas...
Reinstall Fedora, keep files?
1,289,568,683,000
I'm trying to compile some software (FocusWriter) on openSUSE 11.3, (linux 2.6.34.7-0.5-desktop). (I can't find an actual download link to the alleged openSUSE RPM...just lots of metadata about the RPMs). So I unpacked the source from git, and, following instructions, ran qmake. I get this: Package ao was not found i...
You have the user libraries installed, but you also need to install the developer libraries and header files. Taking ao as an example: The normal user package includes files like: /usr/lib/libao.so.4.0.0 /usr/lib/libao.so.4 whereas the developer package include files like: /usr/include/ao/ao.h /usr/include/ao/os_type...
qmake looking for lib files named *.pc
1,289,568,683,000
im installing arch linux, the x86-64 net install. during the part where the hard drive is being processed/erased, i get: "Warning: Could not create all needed filesystems. Either the underlying blockdevices didn't become available in 10 iterations, or process filesystem failed." How do i fix that? How do i know which ...
You can always use another tool, like GParted, to set up your partitions and then return to the Arch installer and proceed with installing the packages and setting up the rest of your system. In terms of the filesystems, the Beginners' Guide has a thorough section on what partitions you need (basically, you can get aw...
arch linux installation, "could not create filesystems"
1,289,568,683,000
I am installing crunchbang linux (#!) to my eeePC and it is unable to start the disk partitioner. I traced the problem to partman and partman-lvm that states No volume groups found. So I have done some snooping, and I can get around that part of the installer (that just hangs) if I can mount my future root partitio...
You're doing it the right way. It may be that the device /dev/sda1 doesn't exist yet. You also probably don't need to specify -t ext3 since that should be default. I don't expect having it would cause any problem though.
mount root fs to /target
1,289,568,683,000
I know Debian is general purpose, so a Debian install could just as easily be a server as a desktop. It seems, however, that even with a DVD of disk1 from Debian, it is downloading a tremendous number of files from the network mirror. I would have thought a DVD would be enough to get a base desktop installation runnin...
Because the full debian distribution for even a single architecture now well exceeds seven DVDs, and the packages on each DVD are sorted by popularity, not by common theme. Every single installation manual strongly recommends installing from a minimal CD or USB image (100 MB or less, generally) and installing over th...
Why does installing Debian from DVD download many packages?
1,289,568,683,000
When I try to install FreeBSD I always get confused as to which iso is the correct one for Rack mounted servers. In their download choices, there are too many versions of FreeBSD Which one is the correct one to burn in CDROM or USB drive to install?
What you do is look up the processor architecture. This is an intel processor of the x86 family, supporting 64-bit mode (you can see this very clearly in the list of supported operating systems, for example). So you need either i386 or amd64. Almost all current servers, and most desktops for that matter, have amd64 pr...
Which FreeBSD version or ISO for Dell R310?
1,509,599,676,000
I am using iptables with ipset on an Ubuntu server firewall. I am wondering if there is a command for importing a file containg a list of ip's to ipset. To populate an ipset, right now, I am adding each ip with this command: ipset add manual-blacklist x.x.x.x It would be very helpfull if I can add multiple ip's with ...
You can use ipset save/restore commands. ipset save manual-blacklist You can run above command and see how you need to create your save file. Example output: create manual-blacklist hash:net family inet hashsize 1024 maxelem 65536 add manual-blacklist 10.0.0.1 add manual-blacklist 10.0.0.2 And restore it with bel...
How to import multiple ip's to Ipset?
1,509,599,676,000
Is it possible to have one IPv4 and one IPv6 IP set (ipset(8)) within the same rule? I have several rules that depend on one set of IPv4 addresses and another set of IPv6 addresses respectively, but are otherwise identical. I should add that there is a feature in ipset(8) which sounded hopeful, but turns out to offer...
Turns out richard was right. The list:set type is indeed the solution although I find the wording in the documentation somewhat confusing, if not misleading. It is possible to have, say the following contents to be used with ipset restore: create dns4 hash:ip family inet create dns6 hash:ip family inet6 create dns li...
Is there a way to match an inet and inet6 IP set in a single rule?
1,509,599,676,000
I have one single ipset added to my iptables on a CentOS 6.x box and this rule is lost when the machine reboots. I've found this answer showing how to make a Ubuntu system reload the iptables rules after a reboot but this directory is not present on CentOS. How do I make this CentOS box load the firewall rules after ...
You lost rules because: After adding rules you have to do save before restart service or server. because when you add rule, they are in memory but after saving they will save in file and restore from that file at start-up. So first You need to save added rules using: $ /etc/init.d/iptables save This will save all ...
iptables rules not reloading on CentOS 6.x
1,509,599,676,000
In iptables-extensions(8) the set module is described and it is discussed that it is possible to react to the presence or absence of an IP or more generally a match against an IP set. However, it does not seem that there is a way to append items to an IP set on the fly using an iptables rule. The idea being that if I ...
Turns out it is possible, using the SET target described in iptables-extensions(8). SET This module adds and/or deletes entries from IP sets which can be defined by ipset(8). --add-set setname flag[,flag...] add the address(es)/port(s) of the packet to the set --del-set setname flag[,flag...] ...
Can iptables rules manipulate IP sets?
1,509,599,676,000
connlimit lets me limit the number of connections per client/service. How would I go about to combine such a rule with the IP sets available in more recent versions of the Linux kernel and netfilter?
Let's say we have an ipset named MYTESTSET, and that this ipset is of type hash:ip. It will store just ip adresses. Then match against your IPset and after match against connlimit match extension, with the parameters you want. iptables -A INPUT -p tcp -m set --match-set MYTESTSET src ...
How to combine connlimit with IP sets?
1,509,599,676,000
I am trying to establish a whitelist of clients that have successfully logged into the system, using ipset. What options do I have to let an entry age so that I can later discard it based on its age? Is there a better method than the idea outlined below? I have not found anything provided by ipset directly, so I am tr...
Turns out the man page describes what I was looking for. It's aptly called timeout and can be specified when adding entries to an IP set. I missed it due to a search for wrong terms. A default timeout value can be given when creating a set and later for each entry added - if it is desired to override the set default. ...
How can I let ipset entries "age"?
1,509,599,676,000
I have this range of IPS 197.192.x.x that is brute force attacking my pop/imap/smtp servers day after day. I have this ipset in place that is blocking every IP that tries to hack on my server. I would like to block access for pop/smtp/imap for all IPs starting with 197.192 To do this, I have typed this command: ipset...
You can add another ipset to block, this time of type hash:net, and add 197.192.0.0/16 to that ipset. Or replace your ipset with one of type hash:net since hash:net can store IP addresses as well (netmask 32). To convert from hash:ip to hash:net: ipset save myIpset > myIpset && ipset destroy myIpset && sed s/:i...
iptables... blocking a range without flooding ipset set with IPs
1,509,599,676,000
This is my ipset shell script file like this #!/bin/bash for IP in $(wget -O /var/geoiptest.txt http://www.ipdeny.com/ipblocks/data/countries/{ad,ae,af}.zone) do # ban everything - block country sudo ipset add geo /var/geoiptest.txt done i think last row have fault, how can i resolve that ?
Your iteration is wrong. the correct syntax would be something like: #!/bin/bash sudo wget -O /var/geoiptest.txt http://www.ipdeny.com/ipblocks/data/countries/{ad,ae,af}.zone while read ip; do sudo ipset add geo $ip done < /var/geoiptest.txt
how to addfile to ipset in shell script?
1,509,599,676,000
I'm experimenting DNS server setup that reply different results based on source IP address. and the same time I need to dynamically change what interface external source ip should forward, eth0 physical inteface 192.168.1.10 eth0: virtual interface 1 192.168.1.11 eth0:1 virtual interface 2 192.168.1.12 I...
Have a look at iproute2. You can easily configure many route-tables and define network interface that handles the connection, including solution of your problem. Here you are some useful examples: http://linux-ip.net/html/routing-tables.html http://lartc.org/howto/lartc.rpdb.html References: http://man7.org/linux/m...
Forward traffic to virtual interface based on source IP address dynamically using iptables
1,509,599,676,000
I was wondering about the semantics of ipset(8). Is it possible to add a rule matching a set to iptables and then manipulate the set, or can I only create a set and swap it for an older set in order to apply it to an iptables rule matching the name? I.e. can I add/remove to/from an IP set ad hoc, or can I exchange who...
You can add and remove IPs to your already defined sets on the fly. This is one of the ideas behind IPsets: if this wasn't possible, the whole set extension of iptables wouldn't make much sense. The primary goal of ipset was to enable you to define (also dynamically) classes of matches (e.g. for dynamically blacklist...
Do I have to swap IP sets, or can I add/remove on the fly?
1,509,599,676,000
I have a script running every minute by a crontab. This script scans the system logs and grabs the IPs of every failed attempt to login on the server's dovecot, exim or ssh and add them to an ipset, blocking that IP forever. The problem is this: the script runs every minute and is doing well what it is supposed to do...
iptables -A adds to the end of the chain (note that the long form of -A is --append). You probably have a rule similar to iptables -A INPUT -p tcp --dport XX -j ACCEPT near the top, which is interfering because it is being matched first when the rules are executed top to bottom. There are two obvious ways to work arou...
iptables is not blocking
1,509,599,676,000
I'm using a VPS from a VPS provider that run a 2.6 kernel, RHEL with OpenVZ virtualization system. I want to use ipset utility to manage ip sets on my iptables firewall. This is the error I'm getting when creating an ipset: mindaugas@517713:~$ sudo ipset create cf_ipv4 hash:net ipset v6.20.1: Cannot open session to k...
So, you're not really using a RHEL kernel (and the fact you used apt-get makes me wonder if it is RHEL at all), but an OpenVZ container. OpenVZ containers rely on features provided by the hosting system's kernel, which in this case doesn't support ipsets. There's nothing you can install in the container that will ma...
RHEL: can't use ipset utility with error: cannot open session to kernel
1,509,599,676,000
I am using ipset in conjunction with iptables to create a list of IPs I want to block. I did this: ipset -N blocking iphash ipset -A blocking 124.205.11.230 // and repeated this line for all IPs I want to add to "blocking" list now I have to add this rule to iptables if I do this iptables -A INPUT -m set --set blocki...
iptables -A INPUT -p tcp --dport 25 -m set --set blocking src -j DROP iptables -A INPUT -p tcp --dport 143 -m set --set blocking src -j DROP ... or whatever ports you're using.
Using iptables to block for specific services
1,509,599,676,000
Suppose I add an IP to iptables blocking for exim, dovecot and FTP and this IP visits my server again. Is there any log of this visit so I can confirm the IP was trying to reach the server again but was blocked?
Try doing this : iptables -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
iptables and logs
1,509,599,676,000
Now I perform this: create blockipset hash:ip add blockipset 192.168.1.5 -exist add blockipset 192.168.3.115 -exist Is it possible for iptables and ipset to block ip,port and ip? for example, the list contains: 192.168.1.5 192.168.3.115 192.168.1.55,80 192.168.1.53,22
You can't put different types of elements in the same set with the ipset command. But you can use different sets, one for each type (full list available with ipset help): hash:ip hash:ip,port For example: ipset create blocklistip hash:ip ipset create blocklistipport hash:ip,port ipset add blocklistip 192.0.2.3 ipset...
iptables add ip,port and also IP
1,509,599,676,000
I don't understand some basic concepts of conntrack module. First of all, I'm sure it's enabled in my system (Ubuntu 18.04), modinfo shows info about nf_conntrack and /proc/modules file tells nf_conntrack is "live". Second, I have the following test setup: Machine A (192.168.1.2) <-----> Router Machine (192.168.1.1 & ...
SSH connection was established before port 22 was added to ipset so conntrack should just skip all packets, allowing SSH to work. This is not correct. All packets will be processed through the filter rules, whether they belong to tracked connections or not. It is a very common optimization of iptables rules to put ...
Conntrack and dynamic ipset/iptables rules
1,509,599,676,000
I have this txt files that contains IPs, one per line of file, that I want to block using ipset. I have this bash script that essentially reads from the plain txt file and constructs an array. Then it iterates the array elements and add each one to the ipset I have created for that purpose. The problem is this: if I e...
Your shell knows where to find executables (like ipset) by looking in your PATH, which is set by your environment. cron does not share the same environment. Adding this at the top of the crontab (or your script) should tell it where to find commands as you expect: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin...
ipset not executing from crontab
1,509,599,676,000
Senior programmer here but hate the linux networking limitations which make things difficult compared to all programming languages. Practically I need to make policy based routing that allows specific lan ip addresses to pick specific outgoing interface (let's say eth5). Even ipset is not powerful enough in my situati...
I won't limit my answer to a tiny part of an algorithm because OP is also hitting implementation limits. The answer has to work with them. The routing stack, part of Linux' network stack is limited to handling only 33 CIDR netmasks equivalent to /32 (/255.255.255.255) till /0 (/0.0.0.0) . Other parts of the network s...
ipset alternative or some kind of smart idea for wildcards
1,509,599,676,000
I'm running Debian 8.11 with iptables v1.4.21 and ipset v6.23, protocol version: 6. I'm trying to block access to certain ports for all but a small set of hosts, but it doesn't seem to be working. First of all, I put a small list of IP addresses into an ipset list called allowed-hosts. Then, after running sudo /sbin/i...
It turns out that this is working, after all. I am very, very sorry for the false alarm. I incorrectly thought that it wasn't working properly for the following reason ... I am using both postfix and dovecot, and I have set up postfix to use dovecot to perform its authentication services. I have set up dovecot to writ...
iptables not blocking access via ports?
1,509,599,676,000
I'm building a captive portal (yeah, just-another ;) ) and now I'm trying to handle the core feature, the iptables rules.  Based on ipset I have a list of valid mac-addresses with name allow-mac.  So this is the current config (stripped to the problem itself): echo 1 >/proc/sys/net/ipv4/ip_forward ipset create allow-...
In the first ruleset, you only allow outgoing traffic as you specified -i $LAN: so the reply will be filtered out. It will probably work simply by removing -i $LAN` ? But in this case the whole traffic will be counted (upload + download) If you want to count separately upload and download, you'll probably have to crea...
iptables - allow forward rules by set
1,509,599,676,000
I need to add this 81.212.0.0/14 ip range to ipset. But it doesnt calculate lower than /16. I want to add from 81.212.0.0 to 81.215.255.255 IP addresses. Is there any other way but /14. Im trying to allow connections from a specific IP range. What I tried: ipset -A allowiplist 81.212.0.0/14 What I expected: That sh...
I think the problem is 81.212.0.0/14 have bigger IP count than 65535, maybe idk. You may be exactly correct here. If you are using an IPset of type hash, it has a maximal number of elements it can store, settable by the maxelem parameter when creating the IPset... and the default value for maxelem is 65536. And if y...
ipset How to add IP range from x to y
1,509,599,676,000
My iptables output looks like this: Chain INPUT (policy ACCEPT) num target prot opt source destination 1 DROP all -- 0.0.0.0/0 0.0.0.0/0 match-set sshd src Chain FORWARD (policy ACCEPT) num target prot opt source destination Cha...
You can use -C flag in iptables to check if a set exists: sudo iptables -C INPUT -m set --match-set sshd src -j DROP Return code is > 0 if the set does not exist.
how to check whether an ipset was hooked up to iptables
1,509,599,676,000
I am building a script to detect if IPSET exists. #!/bin/bash str=$(/usr/sbin/ipset test IPsetName 1.1.1.1) echo "$str" #outputs blank line if [[ $str = *"The set with the given name does not exist"* ]]; then echo "IPsetName not found" fi When I run this script I get this output: ipset v6.29: The set with the gi...
Thanks to @StephenHarris ipset command's output is generated on stderr (not stdout) and 2>&1 captures the output to the variable. str=$(/usr/sbin/ipset test IPsetName 1.1.1.1 2>&1) if [[ $str = *"The set with the given name does not exist"* ]]; then echo "IPsetName not found" fi Now this if statement works as exp...
ipset command's output not storing to variable
1,509,599,676,000
I've got many rules like: -A POSTROUTING -s IP_LOCAL1 -j SNAT --to-source IP_PUBLIC1 -A POSTROUTING -s IP_LOCAL2 -j SNAT --to-source IP_PUBLIC2 ... ... -A POSTROUTING -s IP_LOCAL100 -j SNAT --to-source IP_PUBLIC100 Is there any possibility to make an ipset with declaration IP_LOCAL1:IP_PUBLIC1 and then make only one ...
No. Currently it is not possible to use ipset as SNAT directives.
IPset and making firewall simple
1,509,599,676,000
The thing is, I currently have 3 virtual test machines, Client1, ip 192.168.1.10, Client2, ip 192.168.2.20 and Router with ip 192.168.1.1 and 192.168.2.1 as gateway to connect Client1 and Client2. On Router, I have hash:ip,port set, for example: ipset add myset 192.168.2.20,tcp:80 ipset add myset 192.168.2.20,tcp:443 ...
Thanks to this comment, the problem is solved: Instead of iptables -A FORWARD -m set --match-set myset dst -j DROP I had to use iptables -A FORWARD -m set --match-set myset dst,dst -j DROP (two dst instead of one)
How to block certain protocols with ipset?
1,509,599,676,000
I have created a ipset with a bunch of IPs that I want to block access to dovecot and exim. The ipset is called "bannedIPs" and have been added to iptables using this iptables -A INPUT -p tcp --dport 25 -m set --set bannedIPs src -j DROP iptables -A INPUT -p tcp --dport 587 -m set --set bannedIPs src -j DROP iptables ...
Yes, and no. You didn't tell us what service you are running, imap(s) or pop, smtp(s) etc., and if it's all using the default port. But, to verify that you've collected all necessary ports, run i.e netstat -luantp to get a list of listening ports. Then compare the list of ports against it. Also, consider put these rul...
IP set to block access to exim and dovecot
1,509,599,676,000
I am using Debian 8 linux. I'm trying to block input access to a few ports for most IP addresses, except for a small, select list of IP addresses. I am doing the following, but it does not seem to work: % sudo /sbin/iptables -v -A INPUT -p tcp -m set '!' --match-set allow-list src -m multiport --dports 110,143,993,995...
I now realize what I was doing incorrectly. The following fix works for me: % sudo /sbin/iptables -v -I INPUT -p tcp -m multiport --dports 110,143,993,995 -j DROP % sudo /sbin/iptables -v -I INPUT -p tcp -m multiport --dports 110,143,993,995 -m set --match-set allow-list src -j ALLOW ...
iptables: Failure when trying to block port access for most IP addresses, except for a few
1,509,599,676,000
I have a whitelist of ip addresses I'm storing in a ipset. I want to craft an iptables rule for my input chain where any IP NOT on the whitelist gets dropped immediately and no rules further down the chain get considered. If a ip matches an address on the whitelist then it continues down the Chain, checking other rule...
First create a whitelist, with a name (identifier) of choice. I named mine mylist in this example. $ sudo ipset -N mylist iphash In my whitelist, I wana allow 10.10.10.0/24 and 10.80.80.0/24 (and then drop everything not listed) $ sudo ipset -A mylist 10.10.10.0/24 $ sudo ipset -A mylist 10.80.80.0/24 Drop any traf...
iptables: drop any ip not on whitelist, short circuiting chain
1,328,574,065,000
Classical situation: I ran a bad rm and realized immediately afterwards that I had removed the wrong files. (Nothing critical and I had tolerably recent backups, but still annoying.) Knowing that further disk activity was my enemy if I wanted to recover the files with extundelete or such tools, I immediately powered t...
It sounds like you've got a decent grasp on what happened. Yes, because you hard-powered-off the system before your changes were committed to disk, they were there when you booted back up. The system caches all writes before flushing them out to disk. There are several options which control this behavior, all located ...
Why did powering down my machine after a bad `rm` save my files?
1,328,574,065,000
I am asking this question on behalf of another user who raised the issue in the Ubuntu chat room. Do journaling filesystems guarantee that no corruption will occur if a power failure occurs? If this answer depends on the filesystem, please indicate which ones do protect against corruption and which ones don't.
There are no guarantees. A Journaling File System is more resilient and is less prone to corruption, but not immune. All a journal is is a list of operations which have recently been done to the file system. The crucial part is that the journal entry is made before the operations take place. Most operations have multi...
Do journaling filesystems guarantee against corruption after a power failure?
1,328,574,065,000
I have an embedded setup using an initramfs for the root file system but using a custom ext3 partition mounted on a compact flash IDE drive. Because data integrity in the face of power loss is the most important factor in the entire setup, I have used the following options to mount (below is the entry from my /etc/fst...
Don't get misled by the fact that only writeback mentions internal filesystem integrity. With ext3, whether you use journal, ordered or writeback, file system metadata is always journalled and that means internal file system integrity. The data modes offer a way of control over how ordinary data is written to the fi...
What mount option to use for ext3 file system to minimise data loss or corruption?
1,328,574,065,000
I was wondering if it is possible to pull log messages for a particular log with systemd's journal logging. For example, when I open a log in C, openlog('slog', LOG_CONS | LOG_PID, LOG_LOCAL1), to pull just messages logged under 'slog' or LOCAL1? When I do something like journalctl -u slog or journalctl -u LOG_LOCAL1...
Yes, it is possible, but you passed the wrong switch to journalctl. According to journalctl(1) man page: To read messages with a given syslog identifier (say, "foo"), issue journalctl -t foo or journalctl SYSLOG_IDENTIFIER=foo; To read messages with a given syslog facility, issue journalctl SYSLOG_FACILITY=1 (note th...
Pulling log messages for a particular log in systemd journal?
1,328,574,065,000
What is the difference between nointegrity, noatime and relatime? And what is the best option for a SSD? I am using ext4 as my filesystem. And why disabling journaling on my system, data loss can occur? Can I use for example nointergrity & noatime together in fstab, or only one option is accepted? Thank you!
The nointegrity option has no direct relation with atime, noatime, relatime or nodirtime. You could choose only one of the time options for files. Using noatime imply nodirtime. So, noatime will make all files and directories noatime. In my system I can not find the option nointegrity for ext4. Please check the man mo...
Difference between nointegrity, noatime & relatime
1,328,574,065,000
I hope I've got this right: A file's inode contains data such as inode number, time of last modification, ownership etc. – and also the entry: »deletion time«. Which made me curious: Deleting a file means removing it's inode number, thus marking the storage space linked to it as available. There are tools to recover (...
When a file or directory is "deleted" its inode number is removed from the directory which contains the file. You can see the list of inodes that a given directory contains using the tree command. Example $ tree -a -L 1 --inodes . . |-- [9571121] dir1 |-- [9571204] dir2 |-- [9571205] dir3 |-- [9571206] dir4 |-- [9...
what does a "deleted file" entry look like in the journal
1,328,574,065,000
So en route from my old laptop to a new one my old laptop's hard drive got some physical damage. badblocks reports 64 bad sectors. I had a two-month-old Ubuntu GNOME setup with a split / and /home partitions. From what I can tell, a few sectors in / were damaged, but that's not an issue. On the other hand, /home's par...
All right, so for the first question it turns out the debugfs stats command tells what the starting blocks for every section of a group are. In addition, I guessed that inumbers had to be consecutive and increasing, so basic addition of the offset into the inode table and the imap command gave me the first inumbers; i...
Can I find out if a given ext4 block is in the inode table, and if so, can I pick it out of a journal with no header by hand?
1,328,574,065,000
What is the difference between disabling journal on ext4 file system using: tune2fs -O ^has_journal /dev/sda1 and using data=writeback when mounting? I thought ext4 - journal = ext2. means when we remove journal from a ext4 file system, it is automatically converted to ext2(thus we can not benefit from other ext4 fea...
The two are in no way equivalent. Disabling the journal does exactly that: turns journaling off. Setting the journal mode to writeback, on the other hand, turns off certain guarantees about file data while assuring metadata consistency through journaling. The data=writeback option in man(8) mount says: Data ordering ...
disabling journal vs data=writeback in ext4 file system
1,328,574,065,000
summary Suppose one is setting up an external drive to be a "write-once archive": one intends to reformat it, copy some files that will (hopefully) never be updated, then set it aside until I need to read something (which could be a long while or never) from the archive from another linux box. I also want to be able t...
I don't agree with the squashfs recommendations. You don't usually write a squashfs to a raw block device; think of it as an easily-readable tar archive. That means you would still need an underlaying filesystem. ext2 has several severe limitations that limit its usefulness today; I would therefore recommend ext4. Sin...
"write-once archive": ext2 vs ext4^has_journal vs
1,328,574,065,000
Is a journaling filesystem needed in today's desktop world? A good OS doesn't kernel panic every month, and if we are using a laptop, then there aren't any power outages, so why shouldn't we use ext2 as the standard filesystem on a desktop or laptop?
Hardware can still randomly glitch or fail from time-to-time. There are so many components involved in writing a file to storage - CPU, RAM, HDD, I/O BUS, etc. It's not just power-outages or reboots that can cause file-system corruption. That said, it's still okay to use EXT2, just don't complain if something goes wro...
Is ext2 suitable for daily use on a desktop or laptop?
1,328,574,065,000
I am running out of space and when I checked, I found that I have # pwd /usr # ls -l .sujournal -r-------- 1 root wheel 33554432 Dec 31 1969 .sujournal I wanted to ask should/can I remove it? Any implications of that?
No! As a general rule, if you see a system file and you don't know what it is, don't remove it. Even more generally, if an action requires root permissions and you don't know what it would mean, don't do it. The .sujournal file contains the soft updates journal. The file is not accessed directly as a file; rather, it'...
huge .sujournal file on FreeBSD
1,328,574,065,000
Some preamble: I'm taking bitwise copy of disk devices (via dd command) from twin hosts (i.e. with the same virtualized hardware layout and software packages, but with different history of usage). To optimize image size I trailed all empty space on partitions with zeroes (e.g. from /dev/zero). I'm also aware of reser...
You can purge the journal by either un-mounting, or remounting read-only (arguably a good idea when cloning). With ext4 you can also turn off the journal altogether (tune2fs -O ^has_journal), the .journal magic immutable file will be removed automatically. The journal data will still be on the underlying disk of cours...
How to clean journals in ext3/ext4 filesystem? [closed]
1,328,574,065,000
I have a simple Python snippet managed by a systemd service which logs to the rsysogd daemon where I've defined a configuration file to put it to a syslog server with a format I've defined. This is working fine so far. In the code below, I'm passing the argument as the string I want to log on the server. I'm using thi...
I have a simple Python snippet managed by a systemd service which logs to the rsys[l]ogd daemon […] No you haven't. What you have is a service that logs to the systemd journal. The server listening on the well-known /dev/log socket that your Python program is talking to is not rsyslogd. It is systemd-journald. ...
Prevent syslogs from being logged under journalctl
1,328,574,065,000
I've several partitions with ext4. Now, I would want if it makes sense to use tune2fs with flags -c0 (max-mount-counts) and -i0 (interval-between-checks) in the partitions with a journal file-system since it needs less checks?
Generally speaking... yes, it does make sense. Though you might want to run tune2fs -l /dev/sdXY | egrep "Maxim|Check" to see how those flags are set as it all depends on the version of e2fsprogs used to create the filesystems and/or distribution specific patches applied to e2fsprogs. You might already have MAX_MNT_C...
To use -c0 -i0 in file-systems with journal