Bell inequalities must be satisfied by any local and realistic theory. The violation of Bell inequalities paves the way for randomness certification. The maximum amount of randomness that can be generated theoretically is closely related to the state of the system and the number of possible outcomes of the measurements. In a Bell test scenario involving two-outcome measurements on two-qubit entangled states, up to 2 bits of global randomness can be generated in principal. In this paper, we propose a new family of modified tilted-Bell inequalities (MTBI). Through singular value decomposition, we derive the maximal value of MTBI and the optimal measurements strategy for arbitrary partially entangled two-qubit state. Additionally, an analytical relationship between the entangled state parameter and the tilting parameters of the MTBI is derived to certify randomness. 2 bits of global randomness can be achieved from both the almost unentangled two-qubit state and the maximally entangled two-qubit state. We use relatively few measurements, which contributes to improving experimental efficiency and reducing noise interference.