'Linux'에 해당되는 글 10건

  1. 2021.12.04 SecureCRT를 사용한 ubuntu 20.04 ssh 접속 오류 (key exchange) 2
  2. 2019.11.13 Virutal box에서 Ubuntu 16.04.5 LTS 를 구동시, apt update 되지 않음
  3. 2019.08.05 Remote Desktop in Ubuntu 18.04
  4. 2018.04.28 When gnu screen is used in serial console, adjust windows size
  5. 2018.04.01 validate ip address in bash
  6. 2013.06.03 Ubuntu 12.04 LTS에 java6 설치하기
  7. 2012.04.17 Ubuntu 12.04 LTS 일정
  8. 2010.05.27 Linux에서 NTFS 파티션 크기를 변경하기 (작게 혹은 크기)
  9. 2009.10.05 Ubuntu kernel compile
  10. 2009.02.03 How to install Fedora 10 without CD / DVD or any optical media
2021. 12. 4. 20:07

SecureCRT를 사용한 ubuntu 20.04 ssh 접속 오류 (key exchange)

세상 참 빠르게 바뀌고 있다.

Ubuntu 20.04를 설치하고, Local 에서만 작업하다, 어느날 ssh를 접속해야 할 필요가 생겼다.

Putty로는 잘 되는데, SecureCRT v7.1.3을 사용하여 접속하려니,

Key exchange failed.
No compatible key exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

이런 오류가 발생하였다.

SSH7 로 바뀌면서 SSH6의 key 교환 방식을 disable 시켰다고 한다. (보안상의 이유)

우선은 간단하게 다시 enable 시키려면,

# vi /etc/ssh/sshd_config

맨 아래에 두줄을 추가한 후 

# for SSH6 key exchange
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc

sshd 서비스를 재 가동

# systemctl restart sshd

이제 다시 ssh 접속이 가능하다.

나는 local 에서만 사용할 것이라서.... 보안상 이유를 무시하고 사용한다.

참고하시길.

첨언:

https://www.howtoforge.com/community/threads/enable-diffie-hellman-group1-sha1-on-jessie.70764/#post-337033

를 보면, 아예 이전의 Key 알고리즘이 없어서 그런 것이니, 등록하고, Key를 만들면 문제가 해결된다고 한다.

# vi /etc/ssh/sshd_config

아래 두 줄을 추가하고,

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr

저장한 후, key를 만들고, sshd 서비스를 재시작하라고 한다. 누구 해보신 분 추가 설명 요망.

# ssh-keygen -A

# systemctl restart sshd

.끝.

2019. 11. 13. 21:05

Virutal box에서 Ubuntu 16.04.5 LTS 를 구동시, apt update 되지 않음

한 2년 만에 Ubuntu 16.04.5 LTS 를 구동하였다.

오래되어서, apt update 를 수행하였으나, 아래와 같이 오류가 발생한다....헐.

Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-139-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

54 packages can be updated.
43 updates are security updates.

# apt update
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Err:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Err:4 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@u64-16-bj:~# apt list --upgradable
Listing... Done
ghostscript/xenial-updates,xenial-security 9.26~dfsg+0-0ubuntu0.16.04.3 amd64 [upgradable from: 9.25~dfsg+1-0ubuntu0.16.04.3]
libcups2/xenial-updates,xenial-security 2.1.3-4ubuntu0.6 amd64 [upgradable from: 2.1.3-4ubuntu0.5]
libcupsimage2/xenial-updates,xenial-security 2.1.3-4ubuntu0.6 amd64 [upgradable from: 2.1.3-4ubuntu0.5]
libgs9/xenial-updates,xenial-security 9.26~dfsg+0-0ubuntu0.16.04.3 amd64 [upgradable from: 9.25~dfsg+1-0ubuntu0.16.04.3]
libgs9-common/xenial-updates,xenial-updates,xenial-security,xenial-security 9.26~dfsg+0-0ubuntu0.16.04.3 all [upgradable from: 9.25~dfsg+1-0ubuntu0.16.04.3]
libpam-systemd/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
libpoppler58/xenial-security 0.41.0-0ubuntu1.10 amd64 [upgradable from: 0.41.0-0ubuntu1.8]
libsmbclient/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
libssl1.0.0/xenial-updates,xenial-security 1.0.2g-1ubuntu4.14 amd64 [upgradable from: 1.0.2g-1ubuntu4.13]
libsystemd0/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
libudev1/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
  bwbclient0/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
linux-generic/xenial-updates 4.4.0.140.146 amd64 [upgradable from: 4.4.0.139.145]
linux-headers-generic/xenial-updates 4.4.0.140.146 amd64 [upgradable from: 4.4.0.139.145]
linux-image-generic/xenial-updates 4.4.0.140.146 amd64 [upgradable from: 4.4.0.139.145]
linux-libc-dev/xenial-updates 4.4.0-140.166 amd64 [upgradable from: 4.4.0-139.165]
openjdk-8-jdk/xenial-updates,xenial-security 8u191-b12-0ubuntu0.16.04.1 amd64 [upgradable from: 8u181-b13-1ubuntu0.16.04.1]
openjdk-8-jdk-headless/xenial-updates,xenial-security 8u191-b12-0ubuntu0.16.04.1 amd64 [upgradable from: 8u181-b13-1ubuntu0.16.04.1]
openjdk-8-jre/xenial-updates,xenial-security 8u191-b12-0ubuntu0.16.04.1 amd64 [upgradable from: 8u181-b13-1ubuntu0.16.04.1]
openjdk-8-jre-headless/xenial-updates,xenial-security 8u191-b12-0ubuntu0.16.04.1 amd64 [upgradable from: 8u181-b13-1ubuntu0.16.04.1]
openssl/xenial-updates,xenial-security 1.0.2g-1ubuntu4.14 amd64 [upgradable from: 1.0.2g-1ubuntu4.13]
python-samba/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
python3-distupgrade/xenial-updates,xenial-updates 1:16.04.26 all [upgradable from: 1:16.04.25]
qemu-user-static/xenial-updates,xenial-security 1:2.5+dfsg-5ubuntu10.33 amd64 [upgradable from: 1:2.5+dfsg-5ubuntu10.32]
samba/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
samba-common/xenial-updates,xenial-updates,xenial-security,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 all [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
samba-common-bin/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
samba-dsdb-modules/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
samba-libs/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
samba-vfs-modules/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
smbclient/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-0ubuntu0.16.04.17]
sosreport/xenial-updates 3.6-1ubuntu0.16.04.2 amd64 [upgradable from: 3.5-1~ubuntu16.04.3]
systemd/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
systemd-sysv/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
ubuntu-release-upgrader-core/xenial-updates,xenial-updates 1:16.04.26 all [upgradable from: 1:16.04.25]
udev/xenial-updates,xenial-security 229-4ubuntu21.10 amd64 [upgradable from: 229-4ubuntu21.9]
winbind/xenial-updates,xenial-security 2:4.3.11+dfsg-0ubuntu0.16.04.18 amd64 [upgradable from: 2:4.3.11+dfsg-ubuntu0.16.04.17]
# apt update           
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Err:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Err:4 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'kr.archive.ubuntu.com'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'kr.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

 

/etc/resolv.conf 화일을 바꾸어도 안되고, /etc/apt/sources.list 에서 주소를 바꾸어도 안되고,,,

결국은, 아래 사이트 에서 제시한 것 처럼,

$ vi /etc/network/interfaces

# The primary network interface
auto enp0s9
iface enp0s9 inet static
address 10.11.12.11
netmask 255.255.255.0
network 10.11.12.0
gateway 10.11.12.1
broadcast 10.11.12.255
dns-nameservers 8.8.8.8 8.8.4.4

적색 표시된 것 처럼, dns-nameservers 8.8.8.8 8.8.4.4 를 추가한 후에 정상적으로 진행된다.

gateway 설정은 덤,

즐 ubuntu 하시길,,,

출처: https://notpeelbean.tistory.com/entry/linux-Ubuntu-업데이트-서버-연결-에러-aptget-update-에러 [Storm Of Two Yellow Beans]

 

2019. 8. 5. 20:08

Remote Desktop in Ubuntu 18.04

* mate-desktop-environment 로 rdp 설정

sudo apt install xrdp
sudo apt install mate-core mate-desktop-environment mate-notification-daemon

sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
cat /etc/xrdp/startwm.sh

# xrdp X session start script (c) 2015, 2017 mirabilos
# published under The MirOS Licence

if test -r /etc/profile; then
        . /etc/profile
fi

#xrdp multiple users configuration
mate-session

if test -r /etc/default/locale; then
        . /etc/default/locale
        test -z "${LANG+x}" || export LANG
        test -z "${LANGUAGE+x}" || export LANGUAGE
        test -z "${LC_ADDRESS+x}" || export LC_ADDRESS
        test -z "${LC_ALL+x}" || export LC_ALL
        test -z "${LC_COLLATE+x}" || export LC_COLLATE
        test -z "${LC_CTYPE+x}" || export LC_CTYPE
        test -z "${LC_IDENTIFICATION+x}" || export LC_IDENTIFICATION
        test -z "${LC_MEASUREMENT+x}" || export LC_MEASUREMENT
        test -z "${LC_MESSAGES+x}" || export LC_MESSAGES
        test -z "${LC_MONETARY+x}" || export LC_MONETARY
        test -z "${LC_NAME+x}" || export LC_NAME
        test -z "${LC_NUMERIC+x}" || export LC_NUMERIC
        test -z "${LC_PAPER+x}" || export LC_PAPER
        test -z "${LC_TELEPHONE+x}" || export LC_TELEPHONE
        test -z "${LC_TIME+x}" || export LC_TIME
        test -z "${LOCPATH+x}" || export LOCPATH
fi

#xrdp multiple users configuration
mate-session


if test -r /etc/profile; then
        . /etc/profile
fi

#xrdp multiple users configuration
mate-session

test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession


sudo apt install xserver-xorg-core xorgxrdp

cat /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla

[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes

sudo apt-get install gnome-tweak-tool

sudo systemctl enable xrdp 

> 이제 windows의 원격데스크탑으로 log in 하면

ID, password를 넣으면 끝.

* 참고로 ubuntu 설치하면 우선 작업하는 것들

apt update
apt upgrade
apt autoremove
apt install vim
apt install ssh
vi /etc/ssh/sshd_config 


# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

 

2018. 4. 28. 10:19

When gnu screen is used in serial console, adjust windows size

serial console을 사용할 때, screen에서 화면 크기 적용


터미널 에뮬레이터를 사용해서, 원격 접속해서 사용할 때, screen 프로그램을 사용하면 편리하다.

특히, serial console 을 사용할 때 screen을 사용한다면 더욱 더 큰 힘이 된다.

그런데, 에뮬레이터의 창의 크기를 바꾸었는데, screen에서 이를 인식하지 못하였다...난감.

ssh 나 telnet을 사용할 때는 자동으로 인식하였는데....

찾아보았는데,,, 이런 방법이 있다고 한다.

https://cafbit.com/post/terminal_window_size_detection_over/

대단하다. 어찌알고,,,,

마지막 문구에 힌트를 얻어서 한가지 더 시도해 보았다.... 정말 간단하게 해결되었다.

screen을 수행하기 전에 $ resize 명령을 수행하면 적용이 되었다.


root@linux ~$ resize

COLUMNS=160;LINES=52;export COLUMNS LINES;

root@linux ~$ screen


두개의 변수가 필요했나 보다...

난 여기까지 오는데, 무려 6개월 걸렸다.


다른 분들은 도움이 되시길..



2018. 4. 1. 21:13

validate ip address in bash


Linux의 bash shell script을 작성하는데, ip addresss를 입력받는 부분을 작성 중이다.

입력 받은 주소의 적합성을 검사하려고 하는데, 생각보다 간단하지 않았다.


최종 완성된 코드를 올리니, 참고하시라... (귀찮아서 설명을 하지 않음을 이해해 주세요)

#!/bin/bash


function is_number()

{

local src=$1

local stat=1

tdst=`expr $src + 1` 2> /dev/null

stat=$?

return $stat

}


function validate_ip()

{

    local  lip=$1

    local  stat=255

local renumexp='^[0-9]+$'

    if [[ $lip != ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then

        OIFS=$IFS

        IFS='.'

        sip=($lip)

        IFS=$OIFS


printf "0: %s\n" ${sip[0]}

printf "1: %s\n" ${sip[1]}

printf "2: %s\n" ${sip[2]}

printf "3: %s\n" ${sip[3]}


stat=0


vip=${sip[0]}

if [ $stat -eq 0 ] ; then

is_number $vip 2> /dev/null

if [ $? -eq 0 ] ; then

if [[ $vip -gt 255 ]] ; then

stat=1

fi

else

# not number

stat=11

fi

fi


vip=${sip[1]}

if [ $stat -eq 0 ] ; then

is_number $vip 2> /dev/null

if [ $? -eq 0 ] ; then

if [[ $vip -gt 255 ]] ; then

stat=2

fi

else

# not number

stat=12

fi

fi


vip=${sip[2]}

if [ $stat -eq 0 ] ; then

is_number $vip 2> /dev/null

if [ $? -eq 0 ] ; then

if [[ $vip -gt 255 ]] ; then

stat=3

fi

else

# not number

stat=13

fi

fi


vip=${sip[3]}

if [ $stat -eq 0 ] ; then

is_number $vip 2> /dev/null

if [ $? -eq 0 ] ; then

if [[ $vip -gt 255 ]] ; then

stat=4

fi

else

# not number

stat=14

fi

fi

    fi

    return $stat

}



read ip


if validate_ip $ip; then

  echo "success ($ip)"

  exit 0

else

  echo "fail ($ip)"

  exit 1

fi



참고 사이트는

1. validate ip

https://unix.stackexchange.com/questions/111841/regular-expression-in-bash-to-validate-ip-address

https://stackoverflow.com/questions/13777387/check-for-ip-validity


2. check number

https://stackoverflow.com/questions/806906/how-do-i-test-if-a-variable-is-a-number-in-bash

https://www.unix.com/shell-programming-and-scripting/21668-how-check-whether-string-number-not.html


이다.


2013. 6. 3. 23:27

Ubuntu 12.04 LTS에 java6 설치하기

다른 사이트에서 참고하여 올린다. 매번 까먹는다.

Ubuntu 12.04 is my primary OS, however, there doesn’t appear to be many guides on installing the Sun/Oracle JDK on Ubuntu.

In case someone else finds it useful, here’s what I did on my 64 bit Ubuntu 12.04 install:

1. Download the Java SE Development Kit 6 Update 38 for Linux x64 from http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html (The filename should be jdk-6u38-linux-x64.bin and NOT jdk-6u38-linux-x64.rpm.bin)

2. Make the file executable: chmod +x jdk-6u38-linux-x64.bin

3. Extract the file ./jdk-6u32-linux-x64.bin

4. Create a directory called jvm in /usr/lib: sudo mkdir /usr/lib/jvm

5. Move the extracted JDK directory into /usr/lib/jvm: sudo mv jdk1.6.0_38 /usr/lib/jvm/jdk1.6.0_38

6. Make it the default JDK in the system:

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1

sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1

sudo update-alternatives --config javac

sudo update-alternatives --cconfig javaws

sudo update-alternatives --cconfig java


If you want, you can add the JAVA_HOME environment variable to point to your new JDK installation as:

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_38/

and now you can put the JDK binaries like java, javac etc. as:

export PATH=$PATH:$JAVA_HOME/bin

Sticking those two statements in your .bashrc would ensure they always stay in your path across.

Edit: You can also enable the Java plugin for Chrome and Firefox as:

sudo ln -s /usr/lib/jvm/jdk1.6.0_38/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so


*** 참, 전체에 적용하려면, .bashrc 대신에, /etc/bash.bashrc 에 넣으면 끝.


2012. 4. 17. 19:09

Ubuntu 12.04 LTS 일정

우분투에서 5년 지원 버젼으로 곧 신규 업데이트 되는 군요. 기다려 집니다.

Ubuntu 12.04 LTS Release Schedule

1St December 2011 - Alpha1

2nd February 2012 - Alpha2

1St March 2012 - Beta1

22nd March 2012 - Beta2

19th April 2012 - Release Candidate

26th April 2012 - Ubuntu 12.04 LTS final

2010. 5. 27. 19:28

Linux에서 NTFS 파티션 크기를 변경하기 (작게 혹은 크기)

Ubuntu linux를 새로 설치하는 하는데, 이미 Windows가 깔려 있는 경우,

(HDD의 앞 파티션 2개가 NTFS로 되어 있음)

처음 설치 과정에서 이상하게 default로 첫번째 partition을 분할하려고 하였다.

처음에는 멋 모르고 Forward버튼을 눌렀더니, 첫번째 partition을 resize하여 줄이고, 2.5 GB 정도 빈 공간을 만들었다.

이론,

보통 하나의 HDD는 최대 4개의 기본 파티션을 만들 수 있다.

NTFS 파티션 2개가 모두 기본 파티션(primary partition)으로 되어 있기 때문에, 추가로 만들 수 있는 기본 파티션을 2개이다.

(linux는 기본적으로 root 파티션하고, swap 파티션을 만들어야 한다. 성격상 이것들을 모두 기본파티션에 놓기에)

결국 이 HDD에만 ubuntu를 설치하려고 한다면, 2.5GB 공간을 버려야 한다. (이럴수가, 아마도 버그인 듯 하다)

어쩔 수 없이 그냥 뒷 부분에 파티션을 만들어서, ubuntu를 설치하였다.

그런데, Ubuntu software 중에서 KDE partition manager라는 프로그램이 있어 이것으로 기존의 ntfs 파티션의 크기를 변경할 수 있다.

지금 작업 중인데, 시간이 무척 많이 걸린다.

그래도 혹시나, 빈 공간 있으신 분들, 시도해 보는 것도…. (resizing 도중에 computer가 꺼지면 안될 것으로 생각된다. 아마도 치명적일 듯)

사용법은 매우 간단하다.

혹시나 자투리로 짜증나 하시는 분들을 위해…

송골

2009. 10. 5. 20:17

Ubuntu kernel compile

이전에는 Linux 하면 대부분 배포판으로는 RedHat을 사용했던 것 같던데, (그 전에는 Slackware) 요즘은 Ubuntu를 많이 사용하는 것 같다. 나도 뭐 하나 해 볼 것이 있어서 Linux로 작업환경을 구축하는데, 설치가 가장 쉬운 것 같아서, Ubuntu로 구축하였다.

가장 먼저 할 일이 kernel source를 받아서, compile하여 base code를 확립하는 작업인데, 이를 위해서 Ubuntu kernel을 compile하는 작업을 진행하였다. 아래 사이트의 설명을 참고로 진행하였다.

[Linux] Ubuntu 9.04 – Jaunty Kernel Compile – by morcavon

이에 따라 작업한 명령들은 아래와 같다.

$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-jaunty.git work

$ cd work/

$ cat debian.master/changelog | more

$ git tag | more

$ git checkout Ubuntu-2.6.28-15.52 -b Core2

$ git branch

$ ls -la debian.master/config/i386/config

$ cp debian.master/config/i386/config .config

$ cat debian.master/config/i386/config.generic >> .config

$ make menuconfig

$ cp .config ../config.Core2

$ git reset --hard

$ git clean -xdf

$ ls debian.master/abi/

$ cp debian.master/abi/2.6.28-15.51/i386/generic debian.master/abi/2.6.28-15.51/i386/Core2

$ cp debian.master/abi/2.6.28-15.51/i386/generic.modules debian.master/abi/2.6.28-15.51/i386/Core2.modules

$ cp ../config.Core2 debian.master/config/i386/

$ ls -la debian.master/config/i386/

$ vi debian.master/scripts/misc/getabis

$ vi debian.master/rules.d/i386.mk

$ vi debian.master/control.d/flavour-control.stub

$ vi debian.master/control.stub.in

$ ls -la debian

$ cd debian

$ ls -la

$ ln -sf ../debian.master/changelog changelog

$ ln -sf ../debian.master/control.stub.in control

$ ln -sf ../debian.master/control.stub.in control.stub

$ ls -la

$ cd ..

$ ls -la

$ git add .

$ git commit -a -m "Core2 modifications"

$ CONCURRENCY_LEVEL=2 NOEXTRAS=1 skipabi=true skipmodule=true fakeroot debian/rules binary-Core2

 

그런데 마지막에 kernel compile한 후에 오류가 발생하였다.

……………

#

# Remove files which are generated at installation by postinst, except for

# modules.order.

#

mv /home/projects/WLP/ubuntu.kernel/jaunty/Core2/debian/linux-image-2.6.28-15-Core2/lib/modules/2.6.28-15-Core2/modules.order \

/home/projects/WLP/ubuntu.kernel/jaunty/Core2/debian/linux-image-2.6.28-15-Core2/lib/modules/2.6.28-15-Core2/_modules.order

rm -f /home/projects/WLP/ubuntu.kernel/jaunty/Core2/debian/linux-image-2.6.28-15-Core2/lib/modules/2.6.28-15-Core2/modules.*

mv /home/projects/WLP/ubuntu.kernel/jaunty/Core2/debian/linux-image-2.6.28-15-Core2/lib/modules/2.6.28-15-Core2/_modules.order \

/home/projects/WLP/ubuntu.kernel/jaunty/Core2/debian/linux-image-2.6.28-15-Core2/lib/modules/2.6.28-15-Core2/modules.order

dh_testdir

dh_testroot

dh_installchangelogs -plinux-image-2.6.28-15-Core2

dh_installdocs -plinux-image-2.6.28-15-Core2

dh_compress -plinux-image-2.6.28-15-Core2

dh_fixperms -plinux-image-2.6.28-15-Core2

dh_installdeb -plinux-image-2.6.28-15-Core2

dh_gencontrol -plinux-image-2.6.28-15-Core2

dpkg-gencontrol: error: Illegal package name `linux-image-2.6.28-15-Core2'

dh_gencontrol: command returned error code 65280

make[1]: *** [binary-Core2] 오류 1

make: *** [binary-Core2] 오류 2

 

Illegal package name?

여하튼 ./debian/ 아래에 compile은 되었는데, 이후 package와 관련된 작업에서 오류가 발생하였다.

morcavon님의 설명에 감사하며…

*** 2009.10.11 (Sun) 추가

=PROVIDES= 항목을 지우지 않았더니 발생하는 문제였다.
이 항목과 관련된 것을 모두 지웠더니... OK

by 송골

2009. 2. 3. 15:22

How to install Fedora 10 without CD / DVD or any optical media

Use Case
  1. When you don't have CD / DVD drive on your system.
  2. You have Fedora DVD but your system has only a CD Drive.
  3. You don't want to waste time and resources in burning iso on optical media.
Pre-requisites
  1. You have a Fedora DVD iso or rescue cd iso.
  2. You have a Linux installation on your system.
  3. You have a partition (FAT32, ext2, ext3) which you will not format while installing the new OS.
How to proceed

Let us assume you want to install Fedora 10 on your system and you have a Linux distro already installed on your system. You have downloaded the Fedora DVD iso (Fedora-10-i386-DVD.iso). And you have a FAT32/ext2/ext3 partition /stuff/ which you will not format during installation.

Step 1 : Move the Fedora DVD iso to /stuff/ directory.

[root@saini saini]# mv Fedora-10-i386-DVD.iso /stuff/ [Enter]

Step 2 : Mount Fedora DVD iso on /mnt/

[root@saini saini]# mount /stuff/Fedora-10-i386-DVD.iso /mnt/ -ro loop [Enter] (do as root)

Step 3 : Copy the initrd.img and vmlinuz to /boot/ partition

[root@saini saini]# cd /mnt/isolinux/ [Enter]
[root@saini isolinux]# cp initrd.img vmlinuz /boot/ [Enter] (do as root)
[root@saini isolinux]# cd /mnt/ [Enter]
[root@saini mnt]# mkdir /stuff/images [Enter]
[root@saini mnt]# cp /mnt/images/install/img /stuff/images/ [Enter] (do as root)

Step 4 : Create grub entry for booting into Fedora 10

Add these lines at the end of your /boot/grub/grub.conf file.

title Fedora 10 (New installation)
    kernel /vmlinuz
    initrd /initrd.img

Step 5 : Note the device having Fedora DVD iso

[root@saini saini]# df -h [Enter]
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              15G  9.5G  4.1G  70% /
/dev/sda8             135G  116G   13G  91% /stuff
/dev/sda5             4.8G  1.2G  3.4G  26% /home
/dev/sda1              99M   12M   82M  13% /boot

In this case /dev/sda8 contains Fedora DVD iso. Note this down as you need it later.

Step 6 : Reboot

Reboot your system and boot into the Fedora 10 (New installation) grub entry.

Step 7 : Install from hard disk

While in installation wizard, select "Hard drive" as installation method and choose /dev/sda8 as it contains the Fedora DVD iso. And rest is damn easy.

Test result : Fedora 8 --> Fedora 10 upgrade

test date: 2009.02.03.
test result: OK.