ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Безопасность и Уязвимости > Администрирование > *nix системы
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

серверная FreeBSD с флэшки
  #1  
Старый 11.07.2009, 11:23
Аватар для freelsd
freelsd
Участник форума
Регистрация: 25.10.2007
Сообщений: 177
Провел на форуме:
551782

Репутация: 58
Отправить сообщение для freelsd с помощью ICQ
По умолчанию серверная FreeBSD с флэшки

Хочу попробовать идею с сервером, где вся статика будет на флэшке, а хомяк, логи и бэкапы будут храниться на жестком. Система для реализации: FreeBSD 6.4, может кто уже занимался - есть в рунете хорошие статьи?
 
Ответить с цитированием

  #2  
Старый 11.07.2009, 11:37
Аватар для POS_troi
POS_troi
Познавший АНТИЧАТ
Регистрация: 01.12.2006
Сообщений: 1,769
Провел на форуме:
3718311

Репутация: 1118


Отправить сообщение для POS_troi с помощью ICQ
По умолчанию

http://typo.submonkey.net/articles/2006/04/13/installing-freebsd-on-usb-stick-episode-2

Скрипт для подготовки флэхи

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=107264+0+/usr/local/www/db/text/2006/freebsd-hackers/20060326.freebsd-hackers


Цитата:
а хомяк, логи и бэкапы будут храниться на жестком
А эт уже где пропишеш там и будет

P.S. забей.

Последний раз редактировалось POS_troi; 11.07.2009 в 11:47..
 
Ответить с цитированием

  #3  
Старый 11.07.2009, 14:53
Аватар для freelsd
freelsd
Участник форума
Регистрация: 25.10.2007
Сообщений: 177
Провел на форуме:
551782

Репутация: 58
Отправить сообщение для freelsd с помощью ICQ
По умолчанию

За 1 линк спс, во 2 что-та The specified message cannot be accessed. (
 
Ответить с цитированием

  #4  
Старый 12.07.2009, 01:16
Аватар для Useroff
Useroff
Участник форума
Регистрация: 23.08.2008
Сообщений: 143
Провел на форуме:
1149516

Репутация: 52
По умолчанию

Код:
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig2FBDC65E07A585A0BE61730A
Content-Type: multipart/mixed; boundary="------------050405050109030309040603"

This is a multi-part message in MIME format.
--------------050405050109030309040603
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Hi everybody,
attached a tiny script to convert a FreeBSD install iso image to a
binary ufs image ready to be flashed e.g. on an USB pendrive.

The size of the ufs image is calculated from the iso one. The usage for
the script is quite simple:

=2E/fbsd-install-iso2img.sh iso-path img-path

Once you're done, you can dd the img directly to an USB pen. If you also
want to make a serial-console install image just set the serial variable
on top of the script to 1.

This script is derived from another similar one that I made for the
pfSense project. It was requested for those kind of systems which have
an usb port booting-capable and a serial console.

I hope you'll find it useful. Bye,
Dario

P.S.: beer-ware license

--=20
Dario Freni (saturnero@freesbie.org)
FreeSBIE developer (http://www.freesbie.org)
GPG Public key at http://www.saturnero.net/saturnero.asc

--------------050405050109030309040603
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
	name="fbsd-install-iso2img.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
 filename="fbsd-install-iso2img.sh"

#!/bin/sh

# You can set some variables here. Edit them to fit your needs.

# Set serial variable to 0 if you don't want serial console at all,
# 1 if you want comconsole and 2 if you want comconsole and vidconsole
serial=3D0

set -u

if [ $# -lt 2 ]; then
    echo "Usage: $0 source-iso-path output-img-path"
    exit 1
fi

isoimage=3D$1; shift
imgoutfile=3D$1; shift

export tmpdir=3D$(mktemp -d -t fbsdmount)
# Temp file and directory to be used later
export tmpfile=3D$(mktemp -t bsdmount)

export isodev=3D$(mdconfig -a -t vnode -f ${isoimage})

echo "#### Building bootable UFS image ####"

ISOSIZE=3D$(du -k ${isoimage} | awk '{print $1}')
SECTS=3D$((($ISOSIZE + ($ISOSIZE/5))*2))

# Root partition size

echo "Initializing image..."
dd if=3D/dev/zero of=3D${imgoutfile} count=3D${SECTS}
ls -l ${imgoutfile}
export imgdev=3D$(mdconfig -a -t vnode -f ${imgoutfile})

bsdlabel -w -B ${imgdev}
newfs -O1 /dev/${imgdev}a

mkdir -p ${tmpdir}/iso ${tmpdir}/img

mount -t cd9660 /dev/${isodev} ${tmpdir}/iso
mount /dev/${imgdev}a ${tmpdir}/img

echo "Copying files to the image..."
( cd ${tmpdir}/iso && find . -print -depth | cpio -dump ${tmpdir}/img )
#bzcat ${tmpdir}/iso/dist/root.dist.bz2 | mtree -PUr -p ${tmpdir}/img 2>&=
1 > /dev/null

#echo "/dev/ufs/${UFS_LABEL} / ufs ro 1 1" > ${tmpdir}/img/etc/fstab

if [ ${serial} -eq 2 ]; then
        echo "-D" > ${tmpdir}/img/boot.config
        echo 'console=3D"comconsole, vidconsole"' >> ${tmpdir}/img/boot/l=
oader.conf
elif [ ${serial} -eq 1 ]; then
        echo "-h" > ${tmpdir}/img/boot.config
        echo 'console=3D"comconsole"' >> ${tmpdir}/img/boot/loader.conf
fi

cleanup() {
    umount ${tmpdir}/iso
    mdconfig -d -u ${isodev}
    umount ${tmpdir}/img
    mdconfig -d -u ${imgdev}
    rm -rf ${tmpdir} ${tmpfile}
}

cleanup

ls -lh ${imgoutfile}
--------------050405050109030309040603--

--------------enig2FBDC65E07A585A0BE61730A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEIK9Zymi72IiShysRAu8+AKCElEiMHVt7GunLqvwaIZcR6jyW0ACg99pl
0VcbP2t0seCu755/vrdTiE0=
=Pxc5
-----END PGP SIGNATURE-----

--------------enig2FBDC65E07A585A0BE61730A--
 
Ответить с цитированием
Ответ



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Русификация FreeBSD X-3 *nix 8 01.09.2009 00:04
Делаем FreeBSD безопасной (Xakep № 69) zl0ba *nix 12 02.03.2009 22:14
Выбор книги по FreeBSD Ru}{eeZ *nix 10 02.02.2009 00:50
freebsd неуязвима? winterfrost *nix 6 05.01.2009 15:23



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ