LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Preseeding/Kernal Boot Line (Ubuntu Server 10.04-4 LTS x64) - Disable IPv6? (http://www.linuxquestions.org/questions/ubuntu-63/preseeding-kernal-boot-line-ubuntu-server-10-04-4-lts-x64-disable-ipv6-943286/)

Sniperm4n 05-04-2012 11:28 AM

Preseeding/Kernal Boot Line (Ubuntu Server 10.04-4 LTS x64) - Disable IPv6?
 
Hi everyone,

I'm trying to find a way to disable IPv6 during either the preseeding process or by modifying the kernal boot line during the Ubuntu install. The end goal is for IPv6 to be automatically disabled for all of my Ubuntu installs.

Thus far I've tried the following:

1) Add "ipv6.blacklist=yes" to the kernel parameters (The line should read "... -- ipv6.blacklist=yes" afterwards) - I've tried placing this text in a variety of locations within my kernal boot line.

2) Add "ipv6.disable=1" to the kernal parameters - I've tried placing this text in a variety of locations within my kernal boot line.

Unless there's something I'm missing, I guess I'm going to have to create a post install script for this purpose =/.

Thanks,
-Snipe

TobiSGD 05-04-2012 11:56 AM

I don't know if the installer will notice which modules are blacklisted for the installers kernel. But if you want to disable IPv6 on the installed system just add
Code:

d-i preseed/late_command in-target echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf
to your preseed file.

Sniperm4n 05-04-2012 12:21 PM

Excellent, this is much more elegant than what I was about to attempt, thanks for your help once again Tobi! =)

-Snipe

Quote:

Originally Posted by TobiSGD (Post 4670470)
I don't know if the installer will notice which modules are blacklisted for the installers kernel. But if you want to disable IPv6 on the installed system just add
Code:

d-i preseed/late_command in-target echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf
to your preseed file.


Sniperm4n 05-04-2012 04:25 PM

The preseed/late_command failed =/
 
Bummer, this command just failed =/. Here's the error output:

[!!] Finish the installation
Failed to run preseeded command
Execution of preseeded command "echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf" failed with exit code 1.

I got a similar error when I tried adding the word string before in-target. Here's the command directly from the end of my preseed file:

Code:

d-i preseed/late_command in-target echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf
Any ideas by chance Tobi?

Thanks,
-Snipe

Quote:

Originally Posted by TobiSGD (Post 4670470)
I don't know if the installer will notice which modules are blacklisted for the installers kernel. But if you want to disable IPv6 on the installed system just add
Code:

d-i preseed/late_command in-target echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf
to your preseed file.


TobiSGD 05-04-2012 05:13 PM

Sorry, I forgot the string. That is strange, try it with
Code:

d-i preseed/late_command string echo "blacklist ipv6" >> /target/etc/modprobe.d/blacklist.conf

Sniperm4n 05-04-2012 07:19 PM

That fixed the preseeding error, but the following command is still returning a value of 0 (which means it's still turned on):

Code:

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0

I also ran an ifconfig and eth0 is still being fed an inet6 addr =/.

Code:

username@hostname:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1c:23:da:7d:5f
          inet addr:10.1.232.20  Bcast:10.1.232.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:23ff:feda:7d5f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1012 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:126389 (126.3 KB)  TX bytes:157837 (157.8 KB)
          Interrupt:16 Memory:f8000000-f8012800

Here are the contents of the modified blacklist.conf:

Code:

username@hostname:~$ sudo vim /etc/modprobe.d/blacklist.conf

# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
blacklist ipv6

Any ideas? =/

Thanks,
-Snipe

TobiSGD 05-04-2012 08:32 PM

It may be possible that the Ubuntu kernel has the ipv6 drivers not compiled as a module, but inbuilt into the kernel. In that case I don't know how to disable IPv6.
Check the config of the installed kernel for that.

Sniperm4n 05-04-2012 08:47 PM

Please pardon my ignorance, but how do I accomplish this:

"Check the config of the installed kernel for that."

My Unetbootin kernal boot line is:
Code:

label unetbootindefault
menu label ^Install node
kernel /install/vmlinuz
append vga=normal initrd=/install/initrd.gz locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us netcfg/wireless_wep= interface=eth0 hostname=hostname domain=domain file=/cdrom/preseed/preseed.seed cdrom-detect/try-usb=true  quiet --

Thanks,
-Snipe

Quote:

Originally Posted by TobiSGD (Post 4670716)
It may be possible that the Ubuntu kernel has the ipv6 drivers not compiled as a module, but inbuilt into the kernel. In that case I don't know how to disable IPv6.
Check the config of the installed kernel for that.


TobiSGD 05-04-2012 09:01 PM

On the installed system do a
Code:

grep CONFIG_IPV6 /boot/config
I don't have a Debian based system currently installed, so I don't know if the symlink /boot/config exists on those systems (I assume it does), so the name may possibly be /boot/config-KERNELVERSION.
If it delivers something like this
Code:

CONFIG_IPV6=m
then IPv6 is compiled as module and can bee disabled, if it is
Code:

CONFIG_IPV6=y
then the module is inbuilt.

Sniperm4n 05-04-2012 09:22 PM

Sigh
 
I ran the following command:

Code:

grep CONFIG_IPV6 /boot/config-2.6.32-38-server
and it returned:

Code:

DISABLE_IPV6=y
Am I officially out of options as far as disabling IPv6 via preseed? Can it still be run via a late_command post install script?

Thanks,
-Snipe

TobiSGD 05-04-2012 09:26 PM

The problem here is not preseeding, the problem is that I don't know how to disable a driver that is inbuilt into the kernel. Blacklisting won't work in that case.

Sniperm4n 05-07-2012 12:26 PM

Bummer, I'll see if I can accomplish this via a post-install Bash script. Thank you for your time Tobi!

-Snipe

Quote:

Originally Posted by TobiSGD (Post 4670746)
The problem here is not preseeding, the problem is that I don't know how to disable a driver that is inbuilt into the kernel. Blacklisting won't work in that case.



All times are GMT -5. The time now is 07:05 AM.