date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,405,769,071,000
I am using Ubuntu and am just curious as to tell the name of all network interfaces, even the ones I've taken down with sudo ifconfig wlan0 down (for example) as they no longer show up in ifconfig.
You can use ifconfig -a or ip a l.
How to get the name of a network interface that is down
1,405,769,071,000
I'm trying to understand the syntax of ifupdown a bit better, and on several sites detailing fairly straightforward static configurations, the example documentation includes a line stating `network 192.168.0.0' -- or something obviously similar. For example, # The loopback network interface auto lo eth0 iface lo inet...
The network doesn't have to be specified as it is simply the result of address & netmask (& is a binary and): 192.168.10.33 & 255.255.255.0 = 192.168.10.0 It may make it easier to understand by showing it in binary: 11000000.10101000.00001010.00100001 (192.168.10.33) & 11111111.11111111.11111111.00000000 (255.255.2...
In Debian-derived flavours, what does the 'network' line in /etc/network/interfaces actually do?
1,405,769,071,000
I'm trying to list all network interfaces in Windows Subsystem for Linux shell but I got this error message: Warning: cannot open /proc/net/dev (File o directory non esistente). Limited output. Any suggestion?
Making my comment a proper answer, as of the day of this writing, the feature is probably not yet implemented. Since /dev is a special file system created by the Linux kernel on demand, every part of it needs to be implemented in the Windows Subsystem for Linux
Cannot list network interfaces in Windows Subsystem for Linux
1,405,769,071,000
I have a wlan1 connection that I want to share to other computers on my LAN (via Ethernet - eth0). As this is somehow a temporary solution, I want this to be done by a script, so that I do not touch the network configuration files of my host (i.e I'll run this script after each reboot if I want to). The problem is tha...
Is it possible to bypass the bridging part and use iptables instead? If so, you can setup source NAT to masquerade traffic going out on the wlan interface. First you need to enable IP forwarding: echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward Next, you need to masquerade traffic going out: sudo iptables -t nat -A PO...
Share wlan connection to ethernet using command line
1,405,769,071,000
I am trying to unlock my root encrypted Debian Buster on an acepc T11. I installed dropbear, added DEVICE=enp1s0 IP=:::::enp1s0:dhcp to /etc/initramfs-tools/initramfs.conf and executed update-initramfs -k all -u. When the initramfs is loaded, I get multple times the error ipconfig: enp1s0: SIOCGIFINDEX: No such devic...
Turned out, that indeed the network driver was missing in the initramfs. The module argument MODULES=most in /etc/initramfs-tools/initramfs.conf was not sufficient. Thanks to this answer, I found my network driver using lspci -v and added the appropriate module to /etc/initramfs-tools/modules. After rebuilding the ini...
Unlock LUKS device remotely - ipconfig: no devices to configure
1,405,769,071,000
I have an embedded system running Ubuntu 18.04 LTS that has a 3G modem and an Ethernet interface (eth0). Both of these interfaces have access to Internet. When the internet is unavailable on the Ethernet interface (cable is unplugged), I want to set the default gateway to the one of the 3G modem automatically, so the ...
Similar to this question : https://askubuntu.com/questions/948453/internet-connection-stops-after-one-interface-is-down-in-ubuntu-server I will use NetworkManager to manage my connections (3G too). However, when the internet access is lost on the interface that has the lowest metric, the system cannot access to intern...
Use the internet access of another network interface when the main one is down
1,548,939,342,000
I'm setting up a Raspberry Pi running Raspbian with some specialized software and with the intent to ship it out to a customer and just have them plug it in and work. However, since the customer is in a different location, it will obviously have never connected to their wifi network before. It would be ideal if I coul...
So I figured it out... basically you have to edit the /etc/wpa_supplicant/wpa_supplicant.conf file, and add an entry like this one: network={ ssid="My_Network_Name" psk="password" key_mgmt=WPA-PSK }
How can I preconfigure a wireless network I haven't seen yet?
1,548,939,342,000
In the Linux-Ubuntu terminal: ifconfig throws bash: ifconfig: command not found locate command does the same. sudo yum install net-tools throws: bash: yum: command not found as well, but I might also have made a spelling mistake there when I tested it. What does it mean, do I have to install ifconfig? Or are there a...
Different distributions of linux have different tools to install packages, known as package managers - you need to use the right one for your distribution. Yum is the package manager for Red Hat systems. Instead, you need to use apt, Ubuntu's package manager. Try: sudo apt install net-tools locate That pattern should ...
ifconfig and locate command not found, `bash: ifconfig: command not found`
1,548,939,342,000
Does ifconfig show the MAC address of a network interface following ether? Does ether mean ethernet? How does it mean Mac address? virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:b1:aa:1f txqueuelen 1000 (Etherne...
As explained in the ifconfig manpage, in the section on setting options, Set the hardware address of this interface, if the device driver supports this operation. The keyword must be followed by the name of the hardware class and the printable ASCII equivalent of the hardware address. Hardware ...
Does `ifconfig` show the MAC address of a network interface following `ether`?
1,548,939,342,000
Depending on the distribution, invoking ip link set <iface> up (or down; also ifup / ifdown) will look at various config files (/etc/network/interfaces on Debian I think, Gentoo has /etc/conf.d/net...), and make changes (e.g. interact with DHCP etc.) As far as I have seen from strace, the ip command talks to the kerne...
Invoking ip link set <iface> up as you describe is just doing the minimal communication with the kernel over the rtnetlink API (which is not only about routes, but also links, addresses etc. Here it would be RTM_NEWLINK) to bring the interface administratively up. Older ifconfig tool asks the same to the kernel using ...
ip link set <interface> up / down: how are scripts called?
1,548,939,342,000
According to a computation I did on the data from ifconfig, my ethernet connection between my router and computer averages 1298 bytes/packet for TX (close to the MTU of 1500) and only 131 bytes/packet for RX. What could cause such a large discrepancy in the average TX vs. RX packet sizes?
One possibility is that if you are sending data out predominantly, most of the packets coming back to your system will be ACKs, and those are going to be much smaller than the PUSH you're sending.
What can cause a large TX vs. RX average bytes/packet discrepancy?
1,548,939,342,000
I have a fedora core machine, and it is picking up an IPV6 address, but not an IPV4 address. I have done dhclient -r eth0 but the ipv4 address has not come. I have reset the port using ifconfig, but the address keeps coming up as an IPV6 address.
It's possible that the lightning strike destroyed the network port on your machine, and that the IPv6 address is a self-assigned address. Have you tried using the 'ping6' command to try pinging an outside IP address via IPv6 to really ensure that you've got IPv6 connectivity to the outside world? Also, I concur with ...
Fedora Core 4 won't get an IPV4 address
1,548,939,342,000
I have been trying to install the OpenVPN Access Server on my CentOS 7 VPS. However, I have been running into a number of problems. Initially, I had followed this DigitalOcean guide, but after I had problems using that, I later found out that I meant to install the Access Server. I found this DigitalOcean guide for Ce...
Running on Amazon Linux 2016.03 using this package in order to get the server running after the rpm install succeeded, I needed to: sudo ln -s /sbin/ifconfig /usr/sbin/ifconfig The reason openvpnas couldn't execute ifconfig, is because it was trying to run /usr/sbin/ifconfig. The symbolic link fixed it.
CentOS 7 - Cannot start OpenVPN Access Server
1,548,939,342,000
Anyone know how to createa bridge network interface on MacOS v12.4 Mon? I have tried: sudo ifconfig bridge7 create sudo ifconfig bridge7 addm en0 sudo ifconfig bridge7 up In step two I get this: ifconfig: BRDGADD en0: Resource busy
Short answer: see the Apple Support article "Bridge virtual network interfaces on Mac". Long answer: On macOS, you generally shouldn't use ifconfig to modify the network setup; that'll change the "live" interface state, but it tends to get overwritten by the system configuration daemon (configd) setting things to the ...
ifconfig bridge on macos - BRDGADD en0: Resource busy
1,548,939,342,000
I have this output via ifconfig: user@host:~$ ifconfig eth0 | grep bytes RX bytes:999249172034 (999.2 GB) TX bytes:33403577196 (33.4 GB) The host has 7 days uptime. Are the RX bytes and TX bytes counted since the host has been up, or over the lifetime of the host, and the value just "wraps" around when the...
Over the lifetime of the interface, as far as I can tell. That is, if the interface goes away, like if you unload the driver module, the counters will be zeroed when you add it back. (Probably the same if you unplug and reconnect a USB interface, but I didn't test that.) Restarting the system would also reset them, ye...
Are RX bytes and TX bytes of ifconfig since uptime or lifetime or something else?
1,548,939,342,000
If I ssh directly ssh [email protected], the server behaves as normal and I can execute any number of commands before logging out. The server IP address is very similar to one defined in my network settings, but with the last octet switched. The below command reads from ifconfig and generates the correct IP address. i...
You're mixing up stdin for the ssh command and the processing required to generate the final octet. Essentially your command is in this shape, echo 1.2.3.4 | ssh -tt user@`tr 12 21` From this I hope you can see that the tr is receiving input from the echo command (your pipeline) so isn't connected to your terminal. F...
Cannot execute commands after logging in to server over SSH when IP is generated by linux command
1,548,939,342,000
I've been making a BASh script that changes your MAC Address to that of any manufacturer of your choice from a list. At the last part of the script that is run, it stops before finishing. Here is the code for that part: function spoofUseMAC() { echo read -p "[*] $($stopAllFX; $bgBlack; $white)Enter the number cod...
I found the problem: one of the $ifaces had quotes around it when it shouldn't have.
Cannot connect to internet after changing MAC Address
1,548,939,342,000
I want to configure my eth1 interface to have a static IP, even if the cable is not plugged in. Is that at all doable? I need that as I want to eventually configure a DHCP server (isc-dhcp-server) to give an IP address to a device that will be connected to my machine via this interface. The device, however might not b...
You have to write before this: auto eth1 iface eth1 inet static address 192.168.20.1 netmask 255.255.255.0 gateway 192.168.20.1
Configure static IP on eth1
1,548,939,342,000
When I already have an IPv4 address on interface and I try to add a second one with ifconfig eth0 192.168.8.1 netmask 255.255.255.0 up command, then my previous IP address is replaced. I can add second address with for example ifconfig eth0:test 192.168.10.1 netmask 255.255.255.0 up command. This creates so called ali...
From ip-address(8): It is possible to have several different addresses attached to one device. These addresses are not discriminated, so that the term alias is not quite appropriate for them and we do not use it in this document. You can, however, emulate the deprecated “alias” functionality using labels: $ ip a...
Understanding network aliases in Linux
1,548,939,342,000
Is there a way to find my type of router from the command line? My IP address is the standard 192.168.1.1 IP address.
You could use curl http://192.168.1.1 just to get the HTML of the login page. It probably says on it. Also, you could use arp -a to get the MAC of the router, and then look up the first 6 digits to see what hardware vendor it is.
Find type of router
1,548,939,342,000
I am trying to get my CentOS v7 server to run IPv6. Root works, it can ping using "ping6 ipv6.google.com", and ifconfig looks great; I see the lines: eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 149.202.217.90 netmask 255.255.255.0 broadcast 149.202.217.255 inet6 fe80::ec4:7aff:fec4:d912 prefixle...
The following command should give users the capability to use ping6. As root run setcap cap_net_raw+ep /usr/bin/ping
Unprivileged ping6 not working
1,548,939,342,000
I have a linux box and has ethernet, wlan STA/client and wlan Access Point. It's a internet connection via ethernet and I can log in to the box via ssh. But I wish to use the box like a wireless router and be able to connect to internet by using for example a smart phone. I can connect my phone to wifi but it has no i...
In order for your linux box to act as a WLAN access point, you will need to: make sure your wireless NICs use a driver which supports AP. Output of lsmod | grep 80211 usually helps. If your driver doesn't support AP mode, you'll have to get a new WLAN adapter which does. make sure your kernels supports IP forwarding ...
WLAN connected but no internet access
1,548,939,342,000
On a Solaris local zone, what is the default netmask? I have a blank /etc/netmasks file, but if I run ifconfig I can see that the netmask is set to ffffff00 . [username@servername]# /usr/sbin/ifconfig -a lo0:10: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netm...
Depending on the zone and the solaris version you might have to specify the network in different ways. Using shared network interface, the zone OS does not need to know about the network configuration because this is shared with the global zone. So in fact you networks will be defined in the global zone and you just s...
default netmask in Solaris
1,548,939,342,000
I'm using ifconfig on OpenSUSE. When I run ifconfig eth0 I get eth0 Link encap:Ethernet HWaddr CE:FD:75:DF:A5:6D inet addr:172.16.4.177 Bcast:172.16.5.255 Mask:255.255.254.0 inet6 addr: fe80::adfd:75ef:fedf:v56d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:118...
You can start with sed 's/\(:[^: ]\+\) \([^(]\)/\1\n\2/g;s/\()\)/\1\n/;s/^ \+//' it should be close enough, and most probably can be simplified and optimized further. The result: eth0 Link encap:Ethernet HWaddr CE:FD:75:DF:A5:6D inet addr:172.16.4.177 Bcast:172.16.5.255 Mask:255.255.254.0 inet6 addr: fe80::adfd:7...
Formatting ifconfig using sed/awk
1,548,939,342,000
I can connect to the Internet without a problem by using wireless networks. I have a DSL connection on defined which can connect to the Internet when LAN is connected. When I plug-in network cable, network-manager icon keeps waiting for address from LAN and connecting DSL does nothing. What should I do? Output of ifco...
It looks like your cabled connection is not obtaining an IP address from the DSL connection. This can be either because there is no DHCP server running on the network you are connecting to or because the interface is not properly configured. Try doing the following: Install the ifupdown-extra package, (as root): ap...
Debian Jessie: My LAN is not working!
1,548,939,342,000
There is a line in the output info of sudo ifconfig. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 What kind of word type UP is? A verb? It means enhance ,lift,raise? Why write it as UPPING BROADCAST such as RUNNING MULTICAST? Is RUNNING MULTICAST a phrase to modify BROADCAST? dirkt is so kind to explain ...
All of these are flags; it's not a complete sentence. UP is actually a preposition, not a verb (not that it matters), in contrast to DOWN, and an interface is said to be up if it's enabled to transmit and receive network packets. By default, ifconfig only lists network interfaces that are up. You need to use ifconfig ...
up in UP BROADCAST RUNNING MULTICAST
1,548,939,342,000
Running Ubuntu 22.04.3 LTS on top of WSL2 Output of ifconfig: eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1492 inet 172.28.193.11 netmask 255.255.240.0 broadcast 172.28.207.255 inet6 fe80::215:5dff:fe3e:7ffa prefixlen 64 scopeid 0x20<link> ether 00:15:5d:3e:7f:fa txqueuelen 1000 (Ethernet) ...
A few notes, starting with the suggestion to use the ip command and its subcommands. This replaces the deprecated ifconfig command. I'll use ip commands for any examples in this answer. As mentioned in the other answer, WSL2 by default Footnote uses a virtual network interface. As for "where the ... address ... com...
Machine MAC address with Ubuntu on top of WSL2
1,548,939,342,000
My MAC address is not showing in kali linux using the ifconfig command. There is no option for Hwr inside wlan0 which should contain the MAC address how do I find my MAC address?
ip addr will do it, ifconfig is obsolete.
Mac address not showing in ifconfig [closed]
1,548,939,342,000
On a device with Debian 10, I want to make a permanent change to the IP via modifying /etc/network/interfaces . Hence, I modify it as follows : auto lo iface lo inet loopback auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.109.11 netmask 255.255.255.0 gatew...
ifdown and ifup seem to be not the best way to operate on network interfaces due to lots of pseudo-errors with RTNETLINK (Linux routing socket) that will go away only via system reboot, which may not be ideal. IMHO, main way to handle this is via ifconfig commands (please also consider that ifconfig is deprecated and ...
'RTNETLINK answers: Invalid argument' after ifup ethX
1,513,075,304,000
I need to put the IP of my VPS machine into a variable. I mean to the external IP address appearing the value of inet addr section, in ifconfig output. I've tried: ipa="$(hostname -i)" But echo ${ipa} brought the localhost token: 127.0.1.1, so I looked for other solutions and all I found includes many pipes and awk ...
ipa=$(ifconfig | perl -lane '/inet addr:(\S+)/ and $1 !~ "^127" and print $1') Also see here for a plethora of alternatives. E.g. using grep: ipa=$(ifconfig | grep -Po 'inet addr:\K[^\s]+' | grep -v '^127') Explanation: ipa=$( ) assign the output of the command in parentheses to the variable ipa ifconfig show interf...
Putting external IP into a variable - grep operation failed [duplicate]
1,513,075,304,000
I've always had the compulsion of checking man page for system-specific usages, and the one for ifconfig on Ubuntu Kylin is just too confusing. What I'm trying to do is to add additional IPv4 addresses to my virtual machine Ethernet interface, where as the man page for the add subcommand says: add address/prefixle...
Here is the page of the net-tools project: http://net-tools.sourceforge.net/ It includes documentation for all of the commands in the net-tools package. Here is the man-page for ifconfig: http://net-tools.sourceforge.net/man/ifconfig.8.html In order to add an additional IPv4 address to a network interface you woul...
Updated man page for ifconfig in GNU/Linux systems.
1,513,075,304,000
This is my /etc/network/interfaces file: auto bond0 iface bond0 inet manual address 10.66.7.11/24 gateway 10.66.7.1 bond-mode 802.3ad bond-slaves eth2 eth3 bond-miimon 100 bond-downdelay 200 bond-updelay 400 bond-lacp-rate 1 up ifconfig bond0 10.66.7.11/24 up when I bring the bond0...
Among multiple ifupdown implementations, I'll consider it's ifupdown (implementation "v1") and the interfaces(5) configuration as seen on Debian. The bond0 stanza should not use the keyword manual: The manual Method This method may be used to define interfaces for which no configuration is done by default. Such inter...
default gateway not set when using bond0 interface
1,513,075,304,000
From https://networkengineering.stackexchange.com/questions/57935/is-a-network-interface-supposed-to-have-no-more-than-one-mac-address/57937?noredirect=1#comment100988_57937 A network interface in a MAC-based network always requires a MAC address, virtual or physical. However, there are networks that are not MAC-bas...
Since the lo interface is not associated with a hardware network interface (it's a virtual loopback interface), it does not have an Ethernet hardware address (MAC address). Communication though the loopback interface is not MAC-based. No routing needs to take place to send packets between NICs.
Does `lo` have no MAC address?
1,513,075,304,000
In my Redhat 7 Linux machine I see - RX errors 413556 and after some time I see the same error value - 413556 ( not increasing ). First question - is it possible to know when this error triggered? In case value is not increasing, can we say that network is healthy for now? eop1: flags=4163<UP,BROADCAST,RUNNING,MULTICA...
This number is simply a count of the number of errors that have occurred since the network interface was brought into the 'up' state. It's mostly useful for monitoring trends. Since it's not increasing, you can assume that the network was experiencing problems previously, but is currently working fine. To further debu...
Errors from ifconfig?
1,513,075,304,000
In my RHEL 7 minimal installation with Virtualization profile I found that interfaces configured with network manager(s) contain BROWSER_ONLY=no option, which is always set to no by default. Server is currently offline, so I won't post entire config, but this is from "regular", physical WAN facing interface enp5s0 (et...
I found NetworkManager docs that suggests this setting is only used if you also configure proxy settings, i.e. you have PROXY_METHOD=auto present, and then determines whether the proxy settings are for everything of just browsers, however they think they can distinguish that. The default is no already.
What is BROWSER_ONLY option in ifcfg-* network configuration files?
1,513,075,304,000
I'm looking for a way to bring down all other devices except the given one. I think it would be along the lines of greping the ifconfig output to then pull all the device names except the specified one and then use those names as input to an ifconfig $DEV down command.
The ifconfig is deprecated, use ip instead. You can use this simple script: #!/bin/bash if [ -z "$1" ] then echo "Device parameter missing!" exit 1 fi devices=`ip a | grep UP | cut -d " " -f2 | tr -d ":" | grep -v "lo" | grep -v "$1"` for dev in $devices do ifdown $dev done It is call...
How to bring down all internet devices except the specified one?
1,513,075,304,000
So some genius changed the way this is printed. On the Raspberry with Raspbian (Debian Jessie): $ /sbin/ifconfig eth0 eth0 Link encap:Ethernet HWaddr b8:27:eb:71:d5:56 inet addr:192.168.0.11 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::1e43:2c74:e7d6:6419/64 Scope:Link UP BROADC...
This is identically formatted on both systems: $ ip a show eth0 # stretch 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 40:b0:34:96:d9:02 brd ff:ff:ff:ff:ff:ff inet 192.168.0.77/24 brd 192.168.0.255 scope global eth0 valid_lft forever preferred_lft ...
Stable command to parse eth0 IP on jessie and stretch
1,513,075,304,000
I installed the drivers of this device and it works iwconfig here i got: wlan1 unassociated Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:o...
You can verify if your wifi card support the monitor mode through the iw command. There is an example: iw list | grep "Supported interface modes" -A10 sample output ( the monitor mode is supported ) : Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * ...
External wifi adapter (TL-WN821N) can't turn to monitor mode
1,513,075,304,000
I have this command line, but it's doubling the grep and awk ifconfig eth1 2> /dev/null | grep "inet " | awk '{gsub("addr:","",$2); print $2 }' || ifconfig eth0 2> /dev/null | grep "inet " | awk '{gsub("addr:","",$2); print $2 }'` I have being trying to shorten this by doing something like, echo $(ifconfig eth1 2>...
Try this: $ ( ifconfig eth2 2>/dev/null || ifconfig eth0 2>/dev/null ) | grep ... It has the same logic, but it does the || inside the parens so it only passes the output of the successful command to grep.
optimize command with or and pipe to parse the output of ifconfig
1,513,075,304,000
I'm trying to install vicibox, an OpenSUSE distro which includes Asterisk. The fine manual says to set a static ip address with yast lan. What's the difference between: ││[ ] Change Hostname via DHCP ...
From your output: arrakis:~ # ip route 127.0.0.0/8 dev lo scope link 192.168.0.0/24 dev enp5s0 proto kernel scope link src 192.168.0.21 arrakis:~ # You don't have a default route. So you can only reach things on 127.0.0.0/8 (localhost) or 192.168.0.0/24 (the local subnet). Add a default route and you should be ...
why can't I ping Google with a static IP address?
1,513,075,304,000
On runnning ifconfig command I get the following as output. I need the IP address of eth1 for running my python server port with. eth0 Link encap:Ethernet HWaddr 08:00:27:CE:08:3D inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fece:83d/64 Scope:Link ...
fe80::/64 is a ipv6 address reserved to Link-local. ip a l dev eth1 should be enough to show your ip address on this specific interface(if assigned or acquired through a dhcp-server). Worth reading: Why is fe80::/10 reserved for link local addresses when fe80::/64 is actually used? Where is the statement of deprecati...
Not able to resolve IP address for eth1 in Vagrant VM
1,513,075,304,000
I'm using centOS 6.3 on virtualbox as guest OS on Win 7 host. My problem is when I use ifconfig command in terminal, I'm being thrown internal IP address(10.x.x.x). However, when I googled "my IP address" I got my actual IP address. The same thing happens when I type ipconfig in DOS prompt. Is there a way to get exter...
What you describe as your "actual" IP address isn't, it is the IP address of your router, or anything else that got an IP address from your provider and acts as an intermediary for your computer to the internet. That is why your (windows) hosts provides an internal address as well. Your VirtualBox host gives out IP ad...
ifconfig command showing internal ip address
1,513,075,304,000
How do you get only hardware interfaces Tried: ifconfig -a ip link show How do you get only local hardware interfaces using ifconfig/ip link show? Like from my ifconfig I get(removed a lot): en0: inet 192.168.0.146 netmask 0xffffff00 broadcast 192.168.0.255 utun0: utun1: utun2: utun3: utun4: Update: I guess it is in...
-You can try using awk like this way! ifconfig | awk '{print $1"\t"$7}' | grep eth0 or this another way... ifconfig | awk '{print $1"\t"$7}'|grep eth0|awk '{print $2}'
ifconfig/ip link show- how to get only Hardware interface
1,513,075,304,000
I am trying to set up communication between my laptop computer, running Ubuntu 20.04.2 LTS, and an Ettus Research USRP N210. I have been consulting the following resources: https://files.ettus.com/manual/page_usrp2.html#usrp2_network https://kb.ettus.com/USRP_N_Series_Quick_Start_(Daughterboard_Installation)#Step_9 h...
If I interpret the ping output correctly, the ping packet reaches the N210, which replies with an ICMP packet (you can verify that with tcpdump), which means the N210 is very likely configured for a different address. The manual says Change the USRP2's IP address (Method 2) This method assumes that you do not know th...
Ethernet config for computer-USRP communication
1,513,075,304,000
Upon the install of BigBlueBotton in Debian 9, I run the script bbb-conf --check to make consistency checks of the setup. (bbb-conf is a configuration/setup tool to BBB) The script return me in all consistency checks the address of the machine as inet. What is happening?
I have found out why bbb-conf is not seeing the IP address correctly. bbb-conf is a bash script that runs the ifconfig command. The cause is that the output/fields of the ifconfig output changed in Debian version 9. Thus, the regexps in the script no longer give a match to the current address. In Debian 8/Jessie: ine...
BBB: `bbb-conf --check` showing IP addresses as `inet` - ifconfig woes
1,513,075,304,000
My issue looks similar to this one. I configure my Broadcom BCM4311 802.11b/g device on FreeBSD 10.3-STABLE like this: sudo kldload if_bwn sudo kldload bwn_v4_ucode sudo kldload bwn_v4_lp_ucode # # Now, interface `bwn0` is available # sudo ifconfig wlan0 create wlandev bwn0 sudo ifconfig wlan0 up # at this moment...
When you booted your laptop and configured the wired bge0 interface via dhclient, it became the default route (as seen in the rightmost column in the output of netstat -r). When you later configured your wireless bwn0 interface and disconnected the wired interface, it wasn't set to be the default route. When you tri...
Configure wireless network on FreeBSD: router shows wireless device is connected, but cannot ping
1,513,075,304,000
I just got a second IP address for my Debian Squeeze root. I tried to add the address to my network but somehow I messed up. The command I executed: ifconfig eth0 [new ip address] mask 255.255.255.254 Now, I cant get any response from the server e.g. Apache, ftp etc. I did not try to restart it yet. Is there any poss...
You didn't add the second IP address, but instead replaced the first IP address. You should be able to access the server via that second IP address, if the netmask is correct and any firewall allows access to that IP address. For reference, it's easiest IMHO to add extra IP addresses via: ip addr add newip/32 dev eth0...
ifconfig made my server unreachable
1,513,075,304,000
Set up/configuration: I have a RHEL 8 server, running Asterisk 15.x, that has 2 NICs. NMCLI is used for networking NIC0 (eno5np0) is on the trusted network and is configured as a static IPv4 and NIC1 (ens1f0) is on the untrusted side as a DHCP IPv4. Both are UP,BROADCAST,RUNNING,MULTICAST NIC0 is where I access the se...
A gateway with a genmask of 0.0.0.0 is a "default gateway". In other words, it means "unless otherwise specified, the rest of the world is this way." In a simple multi-homed host configuration, there should be just one default gateway in the entire system at a time. You cannot really use two NATted internet connection...
RHEL 8 IP/Kernel Routing Multi-Homed Server Issue - Cannot get a response to ping, when trying to ping from 2nd Interface
1,423,471,335,000
ifconfig gives following output: eth0 Link encap:Ethernet HWaddr 4c:87:0e:z3:e7:11 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuele...
finally found ifconfig based solution! String s="ifconfig | awk -F '[ :]' '/encap|inet addr/{ if($1 != \"\" ){ print $1 \":\" $13 } else print $13 }'| awk -F \":\" '{print $1}'| awk '{ curr=$1 ; if(!system(\"echo \"$1\"|grep ^[0-9]>/dev/null\")) {print prev \"\\t : \" curr;prev=\"\"} else { if(prev!=\"\") {print prev...
Printing interface-ipaddress through single command (piped)
1,423,471,335,000
When we test the eth card with ethtool -S we get rx_missed_errors: 4649. What is the meaning of rx_missed_errors? Is it a major problem? rx_over_errors: 0 rx_crc_errors: 0 rx_frame_errors: 0 rx_fifo_errors: 0 rx_missed_errors: 4649 tx_aborted_errors: 0 tx_carrier_errors: 0 tx_fifo_errors: 0 tx_heartbeat_er...
The exact meaning of rx_missed_errors depends on the Ethernet driver in use, but it’s supposed to count missed packets on the receiver side, i.e. packets which the NIC received but had to drop because they couldn’t be stored or processed — typically, because the FIFO they would have gone to was full. Whether it’s a ma...
What is the meaning of rx_missed_errors?
1,423,471,335,000
I have this output in the following and I am trying to convert it to JSON api format. I want to know how can I do it. rock64@rockpro64:~$ sh MACscript.sh eth0 11:1d:11:11:11:1d lo 00:00:00:00:00:00 Do I have to use python script or can I do it using shell script? This is my MACshell script: rock64@rockpro6...
With plain bash you could do: json=$( sh MACscript.sh | { pairs=() while read interface; read ether; do pairs+=("\"$interface\":\"$ether\"") done IFS=, echo "{${pairs[*]}}" } ) echo "$json" outputs {"eth0":"11:1d:11:11:11:1d","lo":"00:00:00:00:00:00"}
How to convert shell output to JSON?
1,423,471,335,000
I am using the follwing to find the mtu value ifconfig | grep mtu eno17832: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 but in my bash script we want to know exactly the MTU value so we can use this MTU_VAL=` ifconfig | grep mtu | head -1 | awk '{print $NF}' ` b...
Most tools leverage information present in /proc or /sys, concerning ifconfig I'd go with /sys/class/net/<interface>/* files: To get mtu for all interfaces but loopback (lo) this would work: cat /sys/class/net/[^l][^o]*/mtu The exclusion is done by shell globing, anything not starting with l then o is expanded and th...
what is the best approach to capture the MTU value
1,423,471,335,000
Looking at the output of ifconfig or ip link show. Can an interface status be UP/RUNNING/active without an IP address assigned to it?
Yes, it can be UP and RUNNING without an IP address. This can even be useful, e.g. if you are just interested in sending/receiving layer 2 frames, or if you are running a different layer 3 protocol than IP.
Can an interface status be active without an IP address assigned to it?
1,423,471,335,000
I need the user be able to change the IP address, without giving him full super user access. How can I do that? I tried the solution here https://serverfault.com/a/480823 That works fine, but only once, then I have to redo these steps again. How can I grant the user permission to change the IP address whenever he feel...
Easy way to change ip address is on the command line with ifconfig # ifconfig <interface> <ipaddress> netmask <netmask> sudo /sbin/ifconfig 192.168.0.1 netmask 255.255.255.0 # for changing gateway if desired sudo /sbin/route add default gw 192.168.0.253 eth0 you edit the sudoers file using visudo Opti...
How can I grant permission to a user to change the IP address?
1,423,471,335,000
I am trying to modify the ethernet device name without modifying grub. I have tried to modify the device name, but when I do, the device stops working. Things I have tried: I've tried this nmcli con edit id "Wired connection 1" set connection.id testname save quit I've also tried this: nmcli connection modify ens...
Changing the name of my network interface caused my mac address to change, therefore it would fail at the mac layer. By hardcoding the mac address into the /etc/sysconfig/network-scripts/ifcfg-testname file using the HWADDR directive, then the interface name change would work just fine; (It failed when I used the MACA...
RHEL 8 - How can I modify an ethernet device name?
1,423,471,335,000
I am using KVM to host a Guest VM. On my host VM, I have created 2 bridges and assigned each to a physical interface (assigned a subnet to them as well). The routing all works very well, I can ping external resources to and from the interfaces. I then assigned these 2 bridges to the guest VM, which is running FreeBSD....
When using KVM, the interface MAC address on the host side is never the same as the MAC address inside the VM, regardless of the OS. It's a consequence of TUN/TAP networking. For example, with a CentOS 7 VM running: $ ip link show v-test1 64: v-test1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state ...
Does FreeBSD Change mac addresses of interfaces?
1,423,471,335,000
I have a freebsd which has the network interfaces as follows. bxe0, bxe1, igd0 and igd1 I want to move them to names like eth0, eth1 and so on. I know that I can do it in the /etc/rc.conf ifconfig_igb0_name=eth0 but during the boot time the network interfaces are still bxe0, bxe1 etc. Is there any way I can chang...
Interfaces are "kernel inventions"; they don't exist outside of the kernel. So "can I give them different names before the kernel gets loaded" makes no sense – they don't exist before the kernel has initialized them.
bxe0 and bxe1 to eth0 and eth1 respectively
1,423,471,335,000
I have build my LFS linux that based in this book, it's working fine and network interface card is working. Even it's configuring IP automatically with using dhcpcd service. According chapter 9 in that books, there's file called /etc/sysconfig/ifconfig.eth0 The problem is, what if I'm using wlan0, do I need to modify ...
By reading the script, it is obvious that it will process all /etc/sysconfig/ifconfig.* files: start) # Start all network interfaces for file in /etc/sysconfig/ifconfig.* do interface=${file##*/ifconfig.} The script will pick the name of the interface to configure from the filename, so y...
Auto detect network interface card, network init.d
1,423,471,335,000
Since some days ago , a strange interface showed up in my system and is there even when I close Virtualbox : $ ifconfig ... vboxnet0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 0a:00:27:00:00:00 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns...
As a workabout, since you don't use host-only networking, I suggest you delete vboxnet0 from VBox network settings. That way it will not be available and your problem will be solved. You can delete it via File->Host Network Manager->Remove.
vboxnet0 interface prevents applications to use Wi-Fi
1,423,471,335,000
How can I get the in/out bytes separate for ifconfig?? I check packets and bytes by ifconfig . ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 153.126.***.** netmask 255.255.254.0 broadcast 153.126.179.255 ether 9c:a3:ba:01:df:c3 txqueuelen 1000 (Ethernet) RX packets 60777328 bytes 183...
You can use netstat -ni to get the packets in an easily-parsable table. For example, netstat -ni Kernel Interface table Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 1534430 0 0 0 605131 0 0 0 BMRU lo 65536 20701 0 0 0 ...
How to get the in/out packets by ifconfig
1,423,471,335,000
I have this output: eth-g0 Link encap:Ethernet HWaddr 44 inet addr:222.222.22.22 Bcafdst:0.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 RX packets:9073618 errors:0 dropped:0 overruns:0 TX packets:6846448 errors:0 dropped:0 overruns:0 collisions:0 txqueuelen:1000 RX byte...
Your question is a little difficult to decipher, but I think this might be what you are trying to do: ifconfig | grep -A1 "^eth-g0 " | grep -Eo "^eth[^ ]+|inet (addr )?[^ ]+" | paste - - I've based this solution on the commands you are trying to run, in the hope that it's easier to understand. It's probably not the o...
Extract interface name and IP address from "ifconfig" output
1,423,471,335,000
on my RedHat 7, i noticed that network connection for Netbackup stopped working and i tried everything including rurning off my firewall and disabled SELINUX with no luck. the only thing i noticed different between this server and other servers is that port 1556 is listening on tcp & tcp6 where the same port on other ...
It's hard to say exactly what's causing the error. Having IPv6 enabled, and listening on the same port shouldn't cause issues. Any system which has dual-stack capability should handle it fine. I've found this bug report from Veritas (and I'm making an assumption that you're using what they refer to as Netbackup) but I...
port 1556 listening on tcp6 causing issues
1,423,471,335,000
I've been using Debian GNU/Linux unstable (sid) for five months now without problems. A few days ago my computer wouldn't connect through ens33 (the Ethernet port at the back of my desktop, embedded in), and I had to use an external USB-to-Ethernet converter for internet. When I checked ifconfig -a, I was shocked the...
Debian is transitioning to Predictable Network Interface Names. enp2s0 = Ethernet controller, bus 2, slot 0, first and only function, or in other words, PCI device 02:00.0. And the lspci output indicates it's a Realtek RTL8101/2/6E. It looks like the RTL8106E at least needs a firmware file or two: you may need to ha...
Debian Standard network interface doesn't work, have to use USB enx00e04c6803a1 [closed]
1,423,471,335,000
I'm working on an embedded device that I think has a bad wifi antenna. When I start the device I run ifconfig and see the wifi interface: ... wlan3 Link encap:Ethernet HWaddr 08:ea:40:d7:63:27 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame...
1) Yes. 2) No. iw wlan3 station dump may give you better information to detect potential hardware problems, i.e. a missing or bad antenna. 3) If the problem is to detect an incorrect SSID or Password, and assuming you are (indirectly) using wpa_supplicant (and not WEP or no encryption), have a look at wpa_cli.
Detecting bad antenna vs bad ssid/password with dhclient/ifconfig
1,423,471,335,000
I am using rpi v3 so I have wlan as well. With this network config, when I am connected to wlan, I have internet access: auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet manual ...
Remove the gateway entry under eth0. This adds a default route via 10.10.10.5, which is not what you want if internet traffic is supposed to go through wlan0.
No internet on wlan then eth0 set to static
1,423,471,335,000
Let us start from closing my eth0.192.168.1.4 is binded with eth0. root@hwy:/home/debian8# ifconfig eth0 down root@hwy:/home/debian8# route -nv Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wl...
ifconfig eth0 down Unless you're doing something uncommon (e.g. applying IP aliases) you should not be using ifconfig (or its successor, ip(8)) directly. You should say ifdown eth0 here. That takes care of many things that ifconfig does not. traceroute -i eth0 stackoverflow.com Your route table says the default r...
Why can't close my eth0 by command `ifconfig eth0 down`?
1,423,471,335,000
I earlier asked a question Wifi isnt working after using wifite [duplicate]. This and this answer helped me. But, the problem is it works but, after few hours later when I start my laptop I get the same issue. I faces the issue whenever I run codes on the . Then, reboot my laptop everything works fine. I am unable to...
You've already tried killing wpa_supplicant and restarting NetworkManager, but if the entire interface is no longer visible in the outputs of commands iwconfig, ifconfig iw list and/or ip link show, then that won't help. The problem could be that the WiFi adapter driver has some kind of miscommunication with the hardw...
wlan0 isn't working most of times
1,413,894,503,000
I've been trying to understand the booting process, but there's just one thing that is going over my head.. As soon as the Linux kernel has been booted and the root file system (/) mounted, programs can be run and further kernel modules can be integrated to provide additional functions. To mount the root file system,...
Nighpher, I'll try to answer your question, but for a more comprehensive description of boot process, try this article at IBM. Ok, I assume, that you are using GRUB or GRUB2 as your bootloader for explanation. First off, when BIOS accesses your disk to load the bootloader, it makes use of its built-in routines for dis...
How does Linux load the 'initrd' image?
1,413,894,503,000
I read through this popular IBM doc (I see it referred quite often on the web) explaining the function of the initial RAM disk. I hit a wall in conceptualizing how this works though. In the doc it says The boot loader, such as GRUB, identifies the kernel that is to be loaded and copies this kernel image and any as...
The entire kernel is loaded into memory at boot, typically along with an initramfs nowadays. (It is still possible to set up a system to boot without an initramfs but that's unusual on desktops and servers.) The initramfs's role is to provide the functionality needed to mount the "real" filesystems and continue bootin...
Is the entire kernel loaded into memory on boot?
1,413,894,503,000
I am trying to customize the initramfs rescue environment and would like to force the kernel to fail mounting / and drop into the (initramfs) rescue shell, as opposed to single user mode. How can I do that? NB: I know how to hook into initramfs-tools to achieve the customization steps, but I need to be able to verify ...
This will drop you into an initramfs shell: Start your computer. Wait until the Grub menu appears. Hit e to edit the boot commands. Append break=mount to your kernel line. Hit F10 to boot. Within a moment, you will find yourself in a initramfs shell. If you want to make this behavior persistent, add GRUB_CMDLINE_LIN...
How can I force a Ubuntu kernel to fail mounting / and drop into the initramfs rescue shell?
1,413,894,503,000
I have just set up a Gentoo base system (which means I can boot and log in and do stuff with it now). My root partition is in an LVM2 virtual group (with a separated /boot partition). In order to boot I need to pass the parameters below to the kernel: root=/dev/ram0 real_root=/dev/vg/rootlv init=/linuxrc dolvm Appare...
Simple answer: No. If you want LVM you need an initrd. But as others have said before: LVMs don't slow your system down or do anything bad in another way, they just allow you to create an environment that allows your kernel to load and do its job. The initrd allows your kernel to be loaded: If your kernel is on an LVM...
Is it possible to put root in LVM without using initrd?
1,413,894,503,000
I'm running Ubuntu 11.10, which came with kernel version 3.0.0-14. I downloaded and built a kernel from the 3.1.0 branch. After installing the new kernel, I see that my /boot/initrd.img-3.1.0 file is HUGE. It's 114MB, while my /boot/initrd.img-3.0.0-14-generic is about 13MB. I want to get rid of the bloat, which is cl...
When building the kernel and module using make oldconfig, make and make install, the resulting modules will have debug information available in the files. Use the INSTALL_MOD_STRIP option for removing debugging symbols: make INSTALL_MOD_STRIP=1 modules_install Similarly, for building the deb packages: make INSTALL_MO...
Why is my initial ramdisk so big?
1,413,894,503,000
After configuring and building the kernel using make, why don't I have vmlinuz-<version>-default.img and initrd-<version>.img, but only got a huge vmlinux binary (~150MB)?
The compressed images are under arch/xxx/boot/, where xxx is the arch. For example, for x86 and amd64, I've got a compressed image at /usr/src/linux/arch/x86/boot/bzImage, along with /usr/src/linux/vmlinux. If you still don't have the image, check if bzip2 is installed and working (but I guess if that were the problem...
vmlinuz and initrd not found after building the kernel?
1,413,894,503,000
While reading through the kernel documentation on ramdisk in ramfs-rootfs-initramfs.txt i was having a doubt like the ramdisk explained there is same as the initrd features described in the post at the-difference-between-initrd-and-initramfs. Could someone clarify me on this?? And if it is the same, i read that t...
A ramdisk is a set of blocks that gets copied to an allocated chunk of memory, then treated as a block device. A normal filesystem is created on the ramdisk. The initrd (initial ramdisk) is a ramdisk that is mounted during bootup. The initramfs is something different. It's a cpio archive of files that is loaded dur...
Is Ramdisk and initrd the same?
1,413,894,503,000
How do the md devices get assembled at bootup in Ubuntu? Is /etc/mdadm/mdadm.conf truly the relevant factor here? My mdadm.conf is sound and I checked that while I was in the rescue CD environment. When running mdadm -A --scan it finds and assigns the device names as desired. The mdadm.conf contains AUTO -all to take ...
Basic Boot Process Grub Grub reads its disk, md, filesystem, etc. code from the MBR. Grub finds its /boot partition, and reads the rest of itself out of it. Including the config, and any modules the config specifies need loading. Grub follows the instructions in the config, which typically tell it to load a kernel an...
Ubuntu: How do the md devices get assembled at bootup?
1,413,894,503,000
I'm running Debian Bookworm on a TS412 (QNAP); it stores the kernel & initrd in flash. It has a total of 16MB of flash. So even after tweaking with the MD partitions the best I can get is a 12MB initrd . I'm using xz compression. But even so, the initial initrd was 12.5MB. I know the common fix is to reduce modules, b...
There could be a binary intended to display graphical information during boot that would pull libraries it depends upon in the initramfs file. One such binary available on most architectures, including armel is the label.so plugin provided by plymouth-label as a plugin for Plymouth in order to have a graphical display...
Eliminate inclusion of X11 libs in initrd
1,413,894,503,000
Can the initramfs image be compressed by a method other than gzip, such as lzma?
Yes. I use in-kernel initrd and it offers at least the following methods: None (as it is compressed with kernel) GZip BZip LZMA (possibly zen-only) You can use it on external file and with LZMA (at least on Ubuntu). Wikipedia states that Linux kernel supports gzip, bzip and lzma (depending, of course, what algorithm...
Can the initramfs image use a compression format other than gzip?
1,413,894,503,000
I want to make a very minimal linux os which only have a terminal interface and basic commands/applications (busybox is my choice for commands/apps). I don't want the installation option on my os. I just want it to be booted and run completely from RAM. I'm planning to use ISO-Linux as bootloader. No networking, no v...
Technically you can achieve this. Though, kernel do not have any built-in user-interface. You need to follow steps as: 1. Create a initramfs with static busybox and nothing else. This initramfs will have few necessary directories: like proc, sys, tmp, bin, usr, etc 2. Write a "/init" script, whose main job will be: ...
How to make a minimal bootable linux (only with terminal) from kernel source code? [duplicate]
1,413,894,503,000
I'm currently learning the Linux environment, and decided to manually install the Apache server. For educational purposes, I've compiled it into: /server/apache The http.conf location is configured correctly. It works -- I can open up a browser and navigate to localhost and see the "It works" message. But how does on...
The easiest way is to take the Apache startup script in Ubuntu's Apache package, and replace /usr/sbin/apachectl by /server/apache/bin/apachectl. If it's a learning exercise, you have several options (from most flexible to least flexible): Start Apache through Upstart. You have to write a file /etc/init/my_apache.con...
Add Apache to Ubuntu's startup
1,413,894,503,000
In How do I extract the filesystem image from vmlinux.bin? and https://wiki.gentoo.org/wiki/Custom_Initramfs#Salvaging methods are presented for getting and unpacking an embedded initramfs/initrd included in the kernel image. Now I would like to insert the modified file system (cpio + possibly packed using e.g. lzma) ...
As mentioned in the answer to a similar question about replacing ELF sections discussed at reverseengineering.se simply using dd might be enough under some circumstances apart from the new archive not being larger, e.g. whether there are relocations.
Repack the filesystem image from vmlinux.bin (embedded initramfs) without rebuilding?
1,413,894,503,000
Is it possible to boot linux without a initrd.img ? I am planning to add default drivers as a part-of-kernel itself and avoid initrd completely. What are the modules that should be made part-of-the-kernel instead of loadable modules ?
It is, unless your root volume is on an LVM, on a dmcrypt partition, or otherwise requires commands to be run before it can be accessed. I haven't used an initrd on my server in years. You need at a minimum these modules built in: the drivers of whatever controller where your root volume disk lives the drivers neces...
Booting without initrd
1,413,894,503,000
This is mostly aimed at Debian/Ubuntu, but I feel savvy enough on a variety of distros to be able to adapt the solution for one distro to another. Here's my scenario. There are a few situations when the boot process will drop you to the shell (usually busybox) of the initrd. Most notably whenever you run a hardware RA...
Ubuntu 16.04 contains a package called dropbear-initramfs which is supposed to provide this feature. Lightweight SSH2 server and client - initramfs integration dropbear is a SSH 2 server and client designed to be small enough to be used in small memory environments, while still being functional and secure enoug...
Are there any canned solutions for running sshd in the initrd?
1,413,894,503,000
I know that it's possible to extract from a linux kernel the embedded initramfs cpio. I want to know if the reverse operation is possible; i.e., given both a compiled kernel and initramfs archive, how does one combine them? I'm trying to achieve the same effect of this kernel config... CONFIG_EFI=y CONFIG_EFI_STUB=y ....
Here is my solution: you can create a combined .efi image with kernel, command line and initramfs inside, called a "unified kernel image". Reference: Preparing a unified kernel image – ArchWiki.  You might want to focus on the “Manually” subsection.
How to combine linux kernel and initrd without compiling?
1,413,894,503,000
pivot_root() moves the root filesystem of the calling process to the directory put_old and makes new_root the new root filesystem of the calling process. The typical use of pivot_root() is during system startup, when the system mounts a temporary root filesystem (e.g., an initrd), then mounts the...
It sounds like the alternative implementation of pivot_root() would put the calling process in a new, altered mount namespace. Is that a valid reading? No. IMO this is not very clear, but there is a much more consistent and correct reading. The essential part of pivot_root(), which must be the same in either implem...
Did the pivot_root() documentation anticipate the feature of mount namespaces?
1,413,894,503,000
I'm using an Ubuntu Server (13.04) Minimal installation (with the Xubuntu Metapackage as a desktop environment, if that matters) on x86_64 on my Samsung notebook. I'm currently forced to use the no-longer-maintained version of the proprietary AMD graphics driver (fglrx-legacy) as the open-source "radeon" driver heats ...
Sorry, I totally forgot this question. The solution back then was to use the Saucy (Ubuntu 13.10) Kernel, which is based on 3.11, instead of the vanilla/mainline one. Some changes probably broke compatibility, at least with my combination of hardware and software.
Kernel freezes on loading ramdisk. How to find out what's wrong?
1,413,894,503,000
I wanted to see what files are added on top of ISO 9660 when LiveUSB Linux is running. When booted with persistence upper and work folders are on USB drive clearly seen. I run mount on Linux booted from LiveUSB "usual way" (w/out persistence) and saw / is mounted via overlayfs and upperdir=/cow/upper. But sudo ls /cow...
// Experience based on kubuntu 22 lts livecd after chroot the last step of ramdisk (/cdrom/casper/initrd) is run-init {rootmnt}" "${init}" "$@" which do something like chroot {rootmnt}" "${init}" "$@" after that step it may affect the observation of the original mount point. before chroot Fortunately there are ways to...
Where is /cow for Linux booted from LiveUSB?
1,413,894,503,000
I'm using clonezilla-1.2.12 and need to add the Broadcom firmware to the initrd so it can netboot. (clonezilla is debian-based and debian no longer includes the firmware blobs as they're non-free. Naturally then clonezilla doesn't either.) (I can't use the Ubuntu-based clonezilla as Ubuntu has a bug in it where the Br...
The guilty culprit here was the xz step. Looks like the version of xz on my desktop was doing something incompatible with the decompressor in the clonezilla kernel. Switching to gzip makes it works just fine. According to Steven Shiau, it's necessary to use --check=crc32 when recompressing the initrd with xz. After d...
Adding files to initrd makes linux not be able to read it
1,413,894,503,000
The file shows 56 blocks as the size. I am using the system Ubuntu 16.04 and I need a solution that does not require me to update the kernel.
Although it may be named initrd, it is actually an initramfs. That means, it can be a concatenation of multiple cpio archives, each of which may or may not be compressed. You may have managed to extract just the first part. Proper procedure for extracting an initramfs file More specifically, the first cpio part is usu...
My initrd has only one directory, after decompressing, namely 'kernel'
1,413,894,503,000
The first answer of 'Why does Linux use an Initial Ram Disk at boot?' states that the initrd/initial ram filesystem is used to provide drivers to mount the real root filesystem. It also says that it is possible to patch these drivers into the kernel so an initrd or initial ram filesystem is not required, but gave no e...
You don't need to patch anything. You just need to configure and compile the kernel by yourself. This is advanced task so it is not for begginers. The trick is to configure the kernel to support just your hardware and compile everything inside the kernel and not as a module (at least the drivers necessary for booting:...
Patching the kernel to allow booting without initrd
1,413,894,503,000
How can i create initrd image for a new(experimental) kernel without actually installing it. (Existing tools to create initrd based on config and details from installed kernel.) Say i compile a new kernel with experimental features turned on, i have this in another separate partition. I would like to boot into this k...
Creating an initrd doesn't have anything to do with installing a kernel. All you do is to create a file structure for the initrd, copy the required files, write the init script and package all of that into a cpio archive. I used the instructions in the Gentoo Wiki to make my initrd. Some distributions make tools to ge...
Creating new initrd without installing kernel
1,413,894,503,000
Currently I am learning about linux booting process.Here i noticed that the initrd will create temporary root file system that includes drivers(LVM, NFS, etc) which are required by kernel.After that kernel will make use of that drivers and it will mount real root file system. Here my question is why not kernel itsel...
See also answers on these questions: Why don't we include File System drivers in the kernel itself instead of using Initrd/Initramfs Why do we need initramfs and initrd 1. Why not kernel itself should include the necessary drivers inside it Firstly, know that kernel memory is not demand-paged. That would be a circ...
Why kernel cannot do the initrd/initramfs job itself? [closed]
1,413,894,503,000
I've read that I can boot the kernel without initrd, and I've also read that additional modules are loaded during the initrd stage -- as I understand it, for necessary drivers that weren't included in the kernel. If I build the kernel with make defconfig && make, on what kind of hardware can I expect the kernel to boo...
You can boot without initrd on any hardware. I never use it myself on desktops/laptops and home servers, because it just adds to boot time. The only situation where I've found it really necessary so far, is when your root filesystem is on an LVM (but I may be in error - there might be some way to go about this also). ...
When would an initrd be necessary?
1,413,894,503,000
The Linux kernel contains very minimal code that is necessary to boot on a majority of devices but I don't get the point of having Initrd/Initramfs.As far as I've understood Initrd/Initramfs job is to temporary provide the file system drivers to actually load the root file system. If this the case, then why don't we s...
First, it's not just the filesystem drivers. It's also the drivers for whatever storage device the filesystem is on. And possibly more if you use LVM, encryption, etc. Regardless, it's definitely possible to build them into the kernel. I know slackware at least has a kernel choice named 'huge' which does just that and...
Why don't we include File System drivers in the kernel itself instead of using Initrd/Initramfs
1,413,894,503,000
I've created a gentoo-live system which should be booted from a CF-card. The whole file-system is in a squashfs. I've created a custom initrd which first mounts the CF-card and from there the squashed filesystem into what will become /. I'd like /etc to be writable so I've copied it to the CF-card added a bind. This h...
BusyBox's built-in mount command doesn't recognize -B; you'll have to use -o bind: mount -o bind /mnt/flash/etc /mnt/root/etc Also, I think the remounting is unnecessary if /mnt/flash is already writable. But try fixing the bind mounting first.
Mount /etc from disc into squashfs
1,413,894,503,000
I just installed Debian 6.0, encrypted / and now I'm trying to boot. When GRUB comes up, I select Debian, it loads the initrd and asks for the root password, however I can't enter anything, because the system doesn't recognize my keyboard. It is a standard USB keyboard. What can I do to get my keyboard working?
Either add the following into the /etc/initramfs-tools/modules: usbcore uhci_hcd ehci_hcd usbhid or change the module policy to most in /etc/initramfs-tools/initramfs.conf: MODULES=most After this, repack the initramfs with the command: update-initramfs -u
Getting keyboard to work in debian 6.0 in order to unlock root partition
1,537,537,682,000
Background I have a system that runs Linux. It's a NAS, and does not have any monitor, keyboard, or serial port. It does have a network port. I'm not happy with the software running on it, and am trying to get a different distro to run. What I have On the existing system, I can manage to get a new kernel and initrd bo...
After starting an SSH session, other sessions can write there too, by writing to /dev/pts/<N>. So to see what is happening, since I'm already able to control what PID 1 will end up running, I just need to make it write there. Using exec 0<>/dev/pts/0 1<>/dev/pts/0 2<>/dev/pts/0 from PID 1 and making sure nothing else ...
How can I remotely debug a broken initrd?
1,537,537,682,000
I would like to boot a SLES and run it out of a ramdisk. I would like to setup machines so that they start PXE boot and as part of the PXE boot process they pull across an image that is the root filesystem and then boot this. Has anyone done this or similar yet? My thinking is that the initrd is almost what i want to ...
I have made good progress. I edited the file /etc/init.d/boot.d/boot.rootfsck to add ramfs as a filesystem type exception to the fsck process. (line 79). aufs|tmpfs|afs|cifs|nfs|novell|smb|ramfs|UNKNOWN*) MAY_FSCK=0 ;; After doing this it is no longer necessary to have sysconfig with READONLYROOT. After doing...
initrd or ramfs for SLES as /
1,537,537,682,000
I'm using Kubuntu 11.10 and before I upgrade to 12.04, I want to make snapshots of my filesystems. Coming to think of that, I realized that it can be very useful to create snapshots of logical volumes during boot before they are mounted. At that moment, the volume/filesystem should be clean and is perfect to be used f...
Part of the purpose of LVM snapshots is that you can create them on the fly; there is no need to do it at boot time. LVM takes care to make sure the filesystem is in a consistent state when it creates the snapshot. One of, if not the most common use of LVM snapshots is to get a stable fs image you can make a backup ...
Create Logical Volume Snapshot at boot and before mount
1,537,537,682,000
for now /boot on our linux machines is /dev/sda1 497M 157M 340M 32% /boot we want to create a new linux redhat template and I have the feeling that /boot size is too small for example as I know kdump use /boot and need space under /boot for this so is it right to increase the /boot to 1G ?
For RHEL 7, Red Hat recommends that the /boot partition be set to at least 1 GiB in size. This is documented in the Installation Guide, Section 8.14.4.4: Recommended Partitioning Scheme Quote: /boot partition - recommended size at least 1 GiB The partition mounted on /boot contains the operating system kernel, whic...
how to know the right size of /boot
1,537,537,682,000
I have an old laptop that has a built-in SD card reader, only it's not available at boot. I can however grub boot linux (Debian) from a small 8GB USB key (USB 2.0), but it's very slow. The SD card is a lot faster and must be on a different interface. I can't access the SD card from grub, but was wondering if I could l...
GRUB uses the system firmware routines (i.e. BIOS in your case) for all of its disk I/O operations, so if BIOS cannot read the SD card, GRUB won't be able to do it either. GRUB's job is to load the Linux kernel and initramfs files to RAM, and then transfer control to the Linux kernel. At that point, GRUB's job is don...
Grub: boot with USB key, then continue booting from SD card?