Проблема с установкой пакета - linux-image-server

Вот как переместить загрузку вашего 10.10 в отдельный раздел:

Having /boot on its own partition is useful if you use many linux distributions, especially on different hard disks. Besides, if your root filesystem gets corrupted, you’ll still be able to boot if your /boot is separate. Let’s get started.. first of all we need to create a new ext3 partition which will be our new /boot. In order to decide how big it should be, let’s see how much space our current /boot is taking up. A value of 100Mb should suffice for most needs (unless you’re a kernel hacker with lots of images in /boot): $ du -h /boot Once we have an idea about the size, go ahead and create the partition. You can use GParted… or if you prefer the command line, use mkfs: # mkfs -t ext3 /dev/hda# Now let’s assume that the partition you just created is /dev/hdaX (replace X with the actual digit). We’ll proceed as follows (prepend sudo before each command, or relogin as root): 1. # mkdir /mnt/newboot 2. # mount /dev/hdaX /mnt/newboot 3. # cp -dpR /boot/* /mnt/newboot/ 4. # mv /boot /oldboot 5. # mkdir /boot 6. # nano -w /etc/fstab and modify the /boot line to: /dev/hdaX /boot ext3 ro 0 0 Note that we want /boot to be mounted read-only after the OS boot process. You can also delete the whole entry altogether to prevent /boot from being mounted. 7. # umount /mnt/newboot 8. # mount /dev/hdaX /boot 9. # nano -w /boot/grub/menu.lst Now change the entries corresponding to your old root partition to /dev/hdaX. In grub’s terms, that translates to (hd0,X-1) if it’s the first hard drive. For eg, /dev/hda8 is (hd0,7). Note that you also need to change /boot/xxx.x entries to /xxx.x since the /boot partition is itself the root partition in grub’s eyes. For eg, /boot/grub becomes /grub. Finally, install grub onto the MBR. Issue: 10. # grub-install /dev/hda (Replace /dev/hda with the /dev/… entry of the hard disk where you want to install Grub to). All done! Now reboot. P.S: Any time you want to write to /boot, do a: $ sudo mount -o remount,rw /boot

Ссылка: http://tekguru.wordpress.com/2007/09/04/howto-moving- boot-to-its-own-partition /

И вот как отредактировать автоматические записи:

Creating the Custom Menu The user can either edit the default /etc/grub.d/40_custom file or create a new one. The easiest way to create the content of a custom menu is to copy a working entry from /boot/grub/grub.cfg. Once copied, the contents of 40_custom can be tailored to the user's desires. According to the default sample custom file (/etc/grub.d/40_custom) the first two lines of any custom file in /etc/grub.d should be: #!/bin/sh exec tail -n +3 $0 The user can copy existing menuentries from the /boot/grub/grub.cfg file (...) General menuentry Construction Rules: The first line must start with menuentry and end with { The area between the quotation symbols is what will appear on the GRUB 2 menu. Edit as desired. The last line of the menuentry must be } Do not leave empty spaces at the end of lines The set root= line should point to the GRUB 2 /boot location ( (hdX,Y) ) The root reference in in the linux line should point to the system partition. If GRUB 2 cannot find the referenced kernel, try replacing the UUID with the device name (example: /dev/sda6 ). A sample entry copied from the grub.cfg and altered by the user might look like this: menuentry "My Default Karmic" { set root=(hd0,1) search --no-floppy --fs-uuid --set cb201140-52f8-4449-9a95-749b27b58ce8 linux /boot/vmlinuz-2.6.31-11-generic root=UUID=cb201140-52f8-4449-9a95-749b27b58ce8 ro quiet splash initrd /boot/initrd.img-2.6.31-11-generic }

Ссылка: http: //tekguru.wordpress. ком / 2007/09/04 / HOWTO-двигающаяся загрузка к его собственному-разбиению /

1
задан 18 November 2013 в 19:53

2 ответа

Этот пост был таким благословением для меня, спасибо. Не могу сказать, сколько часов было потрачено впустую, но это был лучший пост для решения моей проблемы. Точно так же мой загрузочный диск был на 100% вместимости, и была аналогичная проблема с зависимостями, которая должна была быть решена, иначе apt-get upgrade потерпит неудачу. Короче говоря, это команды, которые я заменил номером версии заголовков xx как мои, были немного разными.

dpkg --remove --force-remove-reinstreq linux-headers-server
dpkg --remove --force-remove-reinstreq linux-image-server
dpkg --remove --force-remove-reinstreq linux-headers-3.2.0-xx-generic
dpkg --remove --force-remove-reinstreq linux-headers-3.2.0-xx
dpkg --remove --force-remove-reinstreq linux-server

Теперь перезагрузите сервер

shutdown -r now

apt-get autoremove
apt-get -f install
apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')

Окончательная команда уменьшена использование моего загрузочного диска до 16%. См. следующий URL-адрес для получения дополнительной информации о команде. Как удалить старые версии ядра для очистки меню загрузки?

Большое спасибо miha за размещение вашего решения.

3
ответ дан 24 May 2018 в 15:07

Интересно, будет ли только удалять linux-server.

В конце концов, linux-server является причиной установки linux-headers-server и если заголовки не нужны, вся система должна работать хорошо, если установлен только linux-image-server.

У меня была небольшая проблема на небольшом виртуальном хосте, и я удалил linux-server и пакеты заголовков. Сервер работает нормально, но имеет более 700 Мбайт больше свободного места на жестком диске, что очень важно для виртуального хоста 5 гигабайт.

0
ответ дан 24 May 2018 в 15:07

Другие вопросы по тегам:

Похожие вопросы: