LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 05-04-2012, 12:28 PM   #1
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Rep: Reputation: Disabled
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
 
Old 05-04-2012, 12:56 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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.
 
Old 05-04-2012, 01:21 PM   #3
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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 View Post
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.
 
Old 05-04-2012, 05:25 PM   #4
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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 View Post
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.

Last edited by Sniperm4n; 05-04-2012 at 05:27 PM.
 
Old 05-04-2012, 06:13 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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
 
Old 05-04-2012, 08:19 PM   #6
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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

Last edited by Sniperm4n; 05-04-2012 at 08:22 PM.
 
Old 05-04-2012, 09:32 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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.
 
Old 05-04-2012, 09:47 PM   #8
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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 View Post
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.

Last edited by Sniperm4n; 05-04-2012 at 09:49 PM.
 
Old 05-04-2012, 10:01 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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.
 
Old 05-04-2012, 10:22 PM   #10
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-04-2012, 10:26 PM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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.
 
Old 05-07-2012, 01:26 PM   #12
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
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 View Post
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.
 
  


Reply

Tags
10.04, automate, disable, ipv6, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preseeding (Ubuntu Server 10.04-4 LTS x64) - Configuring Numerous Partitions Question Sniperm4n Ubuntu 9 05-07-2012 04:35 PM
Ubuntu Server 10.04-4 LTS x64 English Language Pack Full Support Preseed Problem Sniperm4n Ubuntu 3 05-04-2012 01:17 PM
ubuntu server 12.04 LTS 32 bit i386 boot problem celal Linux - Newbie 2 05-01-2012 07:37 AM
How to scan to file from the command line using Ubuntu Server LTS 10.04? Syllinger Linux - Hardware 1 12-24-2011 07:43 PM
Disable ipv6 in ubuntu? ksgill Linux - Newbie 7 03-25-2006 10:05 PM


All times are GMT -5. The time now is 01:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration